|
||||
Re: Script to delete file every so often
Try MortScript. I'm sure it can be done. MortScript will let you set things to occur at a specific time or every x number of hours (or days, minutes, etc.) If you need help with the syntax, let me know, but the MortScript manual is pretty good.
http://www.sto-helit.de/index.php?mo...st&category=18
__________________
Now with VGA support on all software!
Projects: (PeraStats 1.7) (PeraCount with Clock 1.3) (PeraCount 1.3) (PeraProfiler 1.2) (S2U2Lock 1.1) |
|
||||
Re: Script to delete file every so often
Yuma,
Can you send me an example .mscr file for this? Also, how does one start mortscript? |
|
||||
Re: Script to delete file every so often
Once you install mortscript on your PPC, any .mscr you launch will invoke mortscript as required. What I would do in your case is install mortscript, place my .mscr in /Program Files/Autodelete/ and then put a link to your .mscr in /Windows/Startup/
This code should delete the file /My Documents/file.doc every 3 hours <code> SECONDS = 1000 MINUTES = ( 60 * SECONDS ) HOURS = ( 60 * MINUTES ) While (1) Delete ( "/My Documents/file.doc" ) SLEEP ( 3 * HOURS ) EndWhile </code> The SECONDS, MINUTES, HOURS portion is not required, but makes it easier to determine how often the script will run. You can also write code that would run at a specific time each day. It would need to be in 2 seperate files. Schedule.mscr would be run one time to set the notification queue for the second file. Delete.mscr would be called by the notification queue at the proper time. Nothing would need to be placed in /Windows/Startup/ for this to work. I've never worked with the notification queue, though, and would suggest starting out with the code above. |
|
|
|