Page 1 of 1

Delete-Routines in Hotfolder

Posted: Tue Jan 03, 2017 8:57 am
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

Re: Delete-Routines in Hotfolder

Posted: Tue Jan 03, 2017 2:00 pm
by loicaigon
Here is one you may be interested in:

https://www.noodlesoft.com/

Cheers,

Loic

Re: Delete-Routines in Hotfolder

Posted: Tue Jan 03, 2017 2:22 pm
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

Re: Delete-Routines in Hotfolder

Posted: Thu Jan 05, 2017 4:06 pm
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.

Re: Delete-Routines in Hotfolder

Posted: Thu Jan 05, 2017 4:41 pm
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 6339 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 6339 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 6339 times

Re: Delete-Routines in Hotfolder

Posted: Thu Jan 12, 2017 1:56 pm
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.

Re: Delete-Routines in Hotfolder

Posted: Thu Jan 12, 2017 9:13 pm
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.

Re: Delete-Routines in Hotfolder

Posted: Fri Jan 27, 2017 11:28 pm
by 3f8h.net
Why involve Switch (although I love Switch) - just run this as a windows scheduled task...

Re: Delete-Routines in Hotfolder

Posted: Mon Jan 30, 2017 9:55 am
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.