Guest Cyborg Posted May 7, 2008 Posted May 7, 2008 Hi, I have a folder I wish to only keep 2 days backups in, basically last nights and the day before. Anything older then delete, is this possible?
Guest Herb Martin Posted May 7, 2008 Posted May 7, 2008 Re: Scheduale delete of files based on date? "Cyborg" <apollo13@btinternet.com> wrote in message news:8469B316-EFA0-42E9-B88A-91536FB3F058@microsoft.com... > Hi, I have a folder I wish to only keep 2 days backups in, basically last > nights and the day before. Anything older then delete, is this possible? Yes, but it is harder than it sounds with ONLY built-in tools. Google (group) search the microsoft.public.cmdprompt.admin or similar groups for solutions. Also consider acquiring a purpose built tool for doing it (or at least selecting the files). Perl and over non-batch scripting can make such tasks trivial too.
Guest Pegasus \(MVP\) Posted May 7, 2008 Posted May 7, 2008 Re: Scheduale delete of files based on date? "Cyborg" <apollo13@btinternet.com> wrote in message news:8469B316-EFA0-42E9-B88A-91536FB3F058@microsoft.com... > Hi, I have a folder I wish to only keep 2 days backups in, basically last > nights and the day before. Anything older then delete, is this possible? You could use xxcopy.exe. It's downloadable from a number of sites. @echo off set cutoff=2 set folder=d:\My Data c:\tools\xxcopy.exe /rs /db#%cutoff% /yy "%Folder%" Try the batch file on a test directory before moving on to the real thing.
Recommended Posts