an error popup when I run this script on line 14: "Line: 14 File specified in IfFileChangedSince is not valid" , if I click OK then it works the way it supposed to and the error popped up again for the next file
would someone help me with this
thanks
GetFileList>%dir1%\*.pdf,file_list,;
Separate>file_list,;,oldname
//Loop through folder list
Label>checkforfile
Let>k=0
Repeat>k
Let>k=k+1
Let>orgfile=oldname_%k%
//If>OLDNAME_COUNT=0,END
IfFileChanged>%orgfile%,>5,remove
until>k,oldname_count
Label>remove
DeleteFile>%orgfile%
WaitReady>1
goto>checkforfile
Label>END
error line 14
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
double check
when the error popped up, I click "ok" and the script delete one file and if I keep clicking OK, then eventually all the file in the directory got deleted as it supposed to.
Is there an other command in mscheduler to delete file older than "certain" date instead of that command?
And how come under my name there's a title "Pro scripter"
I am not a programer by any definition 
Is there an other command in mscheduler to delete file older than "certain" date instead of that command?
And how come under my name there's a title "Pro scripter"


- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Another way is to get the file date with the FileDate command and then compare that date with today's date. Best way to do that is with VBScript's DateDiff command which you can use to determine how many days are between the two dates.
The "Pro Scripter" label is just based on the number of posts. Just a bit of fun
The "Pro Scripter" label is just based on the number of posts. Just a bit of fun

Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?