Search the Community
Showing results for tags 'age'.
Found 1 result
I know this question has been asked, and has even been answered ( for example), but even after reading through the AutoIT commands and trying to reverse engineer the fantastic script Varian put together, I'm still having trouble, and I was hoping for some help. Basically, I have a script that runs once an hour, every hour, duplicating a folder into a backup location and stamping it with a date and time stamp. I'm using the simple DirCopy command with some rudimentary macros. An example of what I'm talking about follows: DirCopy("[SOURCE DIR]", "[TARGET DIR]\[" & @MON & "-" & @MDAY & "-" & @YEAR & "]-[" & @HOUR & @MIN & " Hours]", 1) Obviously I've replaced the source and target directories in the above example. When run, the source folder is copied to a \Backups\ alternate folder, as shown in the following examples: - ...\Backups\[07-06-2012]-[0000 Hours] - ...\Backups\[07-06-2012]-[0100 Hours] - ...\Backups\[07-06-2012]-[0200 Hours] - ...\Backups\[07-06-2012]-[0300 Hours] - ...\Backups\[07-06-2012]-[0400 Hours] This goes on for a 24 hour cycle, reaching 2400 hours, at which point the date rolls over and the whole process starts again. The obvious problem is that I don't want these backup folders filling up the entire drive. Therefore, I'd like to add functionality to the script to purge any backup folders previously created which are more than a few days old. Again, I've reviewed the commands in the linked article, and I've done my best to reverse engineer the linked script, but I just can't get it to work. My goal isn't to have an interactive script, but rather to have a script that will run unattended on its own without user intervention. If the script is attended, I might as well just go in and manually purge the old files. I hate to ask someone else to do my work for me, but I'm at the end of my rope with this particular issue. If anyone can (and is willing) to help, I'd really appreciate it. Thanks, Bob