Hey,
I'm trying to create a script to moves files based on the date e.g. today I want to move all files older than 2 weeks to a different folder for archiving.
Is there any easy way to do this in automise?
Cheers,
Bram
Hey,
I'm trying to create a script to moves files based on the date e.g. today I want to move all files older than 2 weeks to a different folder for archiving.
Is there any easy way to do this in automise?
Cheers,
Bram
Sure is.
Use the FileSet Define action, and in the “Filters” tab add a date filter.
I would also suggest using a variable to hold the date from which you want to move files. Use the “Get DateTime” action to get the current date, then subtract two weeks from (available in the same action). Store that value in a variable which can be used in the FileSet Define action.
In the “or this date/time (supports FB Variables)” of the FileSet Define action, place the variable which holds the date you wish to archive files from. Check the “After” radio button, and you should be right to go.
Note that this gives you a list of files which you can iterate and do what you want with them. Handy if you want to zip, copy, move or anything else you see fit.
Let me know how this goes.
Hey Jason,
That worked, thanks a lot for your help!
Cheers,
Bram