Delete-Routines in Hotfolder

Post Reply
senghaas
Newbie
Posts: 17
Joined: Tue Dec 06, 2016 1:40 pm
Location: Heilbronn

Delete-Routines in Hotfolder

Post by senghaas »

We collect XML-files from our leading system to evaluate them via Switch later.
Switch collects the XML and stores it in a folder structur. In the case of a hit, Switch looks for the appropriate XML and matches the parameters.
The Workflow has been running for several months and now we have more than 33.000 files in over 1.500 folders.

Now we need a delete-routine over this folder structure. Defining the top folder as a paper basket would sure overload the System. We thought more of an erase run, which looks once daily for XML-Files older than 6 months, and deletes them.

Does anyone have a good, simple idea at hand?

Thanks in advance and best regards to the new year, :)
Jürgen
loicaigon
Advanced member
Posts: 378
Joined: Wed Jul 10, 2013 10:22 am

Re: Delete-Routines in Hotfolder

Post by loicaigon »

Here is one you may be interested in:

https://www.noodlesoft.com/

Cheers,

Loic
senghaas
Newbie
Posts: 17
Joined: Tue Dec 06, 2016 1:40 pm
Location: Heilbronn

Re: Delete-Routines in Hotfolder

Post by senghaas »

Hi Loic,
thank you for your Suggestion! So you think it is better not to do the Erase Run with Swith, but with a different tool? The Folder (with subfolders) is on a Windows 2000 Server – we have no more Apples in the Access at all. We also could use a Shell Script on Windows. But I would like to solve the Problem somehow with Switch and an daily erase run. Does anybody have another idea?
Jürgen
Zoranj
Member
Posts: 107
Joined: Tue Sep 20, 2016 7:37 pm
Location: Canada

Re: Delete-Routines in Hotfolder

Post by Zoranj »

You can delete the files with simple command prompt command.
I was thinking perhaps automating the command through the Switch by using "Timer" free app.
You would configure timer to create dummy file every day, which triggers command prompt action to delete files older than xx time.

Just thinking of a simple way to do what I understand you want.
Zoranj
Member
Posts: 107
Joined: Tue Sep 20, 2016 7:37 pm
Location: Canada

Re: Delete-Routines in Hotfolder

Post by Zoranj »

I made you quick thing and tested it, to give you an idea.
There might be easier/better way but this should work.
Screen Shot 2017-01-05 at 10.39.20 AM.png
Screen Shot 2017-01-05 at 10.39.20 AM.png (33.76 KiB) Viewed 12056 times
Screen Shot 2017-01-05 at 10.39.20 AM.png
Screen Shot 2017-01-05 at 10.39.20 AM.png (33.76 KiB) Viewed 12056 times
Screen Shot 2017-01-05 at 10.39.20 AM.png
Screen Shot 2017-01-05 at 10.39.20 AM.png (33.76 KiB) Viewed 12056 times
Attachments
Screen Shot 2017-01-05 at 10.39.32 AM.png
Screen Shot 2017-01-05 at 10.39.32 AM.png (64.71 KiB) Viewed 12056 times
Screen Shot 2017-01-05 at 10.39.25 AM.png
Screen Shot 2017-01-05 at 10.39.25 AM.png (23.07 KiB) Viewed 12056 times
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

Re: Delete-Routines in Hotfolder

Post by freddyp »

I like this solution Zoran!

It is another very nice example of the use of an external tool (in this case a Windows command, but it could be anything else), but under the control of Switch to determine when and how the external tool should be run.
Zoranj
Member
Posts: 107
Joined: Tue Sep 20, 2016 7:37 pm
Location: Canada

Re: Delete-Routines in Hotfolder

Post by Zoranj »

Thanks Freddy, there were crickets for a while so I was not sure if this looked dumb or not :)
I did build it and tested it and it works.
3f8h.net
Member
Posts: 26
Joined: Tue Mar 13, 2012 4:14 pm

Re: Delete-Routines in Hotfolder

Post by 3f8h.net »

Why involve Switch (although I love Switch) - just run this as a windows scheduled task...
--
Sebastian Nafroth +++ 3f8h.net / electronic publishing

3f8h.net offers professional services and products for the graphic arts
industry.

contact details: http://www.3f8h.net/kontakt
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

Re: Delete-Routines in Hotfolder

Post by freddyp »

For this particular case it is for Windows so scheduling a task is indeed a very valid choice, but I see three reasons why someone would prefer the Switch method:
  • it will also work on OS X
  • the Switch environment may be the environment that somebody feels more familiar with than with the antics of Windows management
  • there is the possibility to use Switch routing and variables to add extra spice.
Post Reply