Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
satishvsh
Starting Member
41 Posts |
Posted - 2008-06-23 : 12:22:55
|
Friends -I am looking for a windows script (bat file) to delete backup files which are older than 2 days.Please provide scripts on this.Appreciate your supportCheers :)Satish |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
bugbait
Starting Member
1 Post |
Posted - 2008-07-09 : 23:08:31
|
FORFILES is a standard windows file that will do it for you = selects files and executes a command.EgForFiles /p "D:\Dumps" /m *.bak /D -2 /c "cmd /c del @path /Q"This will look in the Dump directory for bak files that are older than 2 days and launch the del command to delete them.EasyPower corrupts, absolute power corrupts absolutely. But it rocks absolutely too. |
|
|
|
|
|