Has anyone used VisualCron to delete files based on 10 days prior to today's date? Also need to try to setup another job to delete all but the most recent 10 files, has anyone done this before with VisualCron? The files are located on UNC path (NAS device).
The first question is quite easy to do directly within visualcron using the Delete File(s) task, the 2nd question I think you'd have to use a custom powershell (or other language) script to do the work for you.
For the first question, deleting files older than 10 days, all you have to do is add a new 'Delete Files' task to your job.
Enter your folder and change the file mask from * to *.txt or *.tif, etc.. (if you need to).
Under the 'Date' tab, enter a variable for a date 10 days ago.
October 14 = {DATENOWADD(Days|-10|M)}
10 Days prior to RIGHT NOW = {DATENOWADD(Days|10|)}
See Screenshot.
Brian
bbusse attached the following image(s):