Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


klewis10367
2012-09-20T13:11:58Z
I am trying to delete files in a folder, but i am running into the scenario where some of the files are in use, which is fine...but what i want to do do is delete all that are not in use. The problem i have is that the job fails on the 1st in use record. I know i can use the loop option...but i have no clue on how to begin with it. Any help would be great. Basically, what i am trying to accomplish is to use visual cron to delete files in my OfficeFileCache file..but some are in use or locked..current date mostly. Thanks.
Sponsor
Forum information
ErikC
2012-09-21T05:54:25Z
Hi klewis10367,

For using a loop, you need some input.
You want to delete files, so the loop task is delete a file and your loop input is the file list.
In this way every file on the list is deleted.
You can configure the delete task to continue on error, so all the in use files are skipped and your loop continues to the next file.

Basicly there are two tasks doing this, the file list task (input for the loop) and the file delete task (the only task in the loop).

Hope this info is enough, just ask if you need more.

Regards,
Erik
Uses Visualcron since 2006.
Scroll to Top