![]() |
IOBit Software
|
|
|
||||||
| Programming Place to discuss programming including HTML, Java, C++, MySQL and others. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I am in need of some help writing a batch file that will delete files out of the specified folder. i have a folder named "backup" and within "backup" i have files that are named:
backup013106.bak backup020106.bak backup020206.bak backup020306.bak backup020406.bak backup020506.bak backup020606.bak so i already have a batch file that copies the new backups into this folder and renames them by date but i would like to add to the file for it to keep only the 2 most recent backups and delete the older ones when ran. any ideas? thanks! |
| Sponsored links |
|
|
|
#2
|
|||
|
|||
|
I'm not sure if it is possible with a batch. You may have to move to .vbs script to run a more powerfull *if-than* statement. I could be wrong though.
__________________
R.L.T.W.-------A+, Net +, CCNA, VB6, JAVA, Crystal Radio |
![]() |
| Thread Tools | |
| Display Modes | |
|
|