Configuration: Windows XP Internet Explorer 6.0
Hai
Try This .. It Will Skip The Latest 30 Folders And Delete The Rest .. It Is In Debug Mode ... Remove The Echo from line 5 after "do" to actually make it delete the folders :: --- BATCH SCRIPT START --- @echo off setlocal set source=C:\source pushd "%source%" for /f "skip=30 delims=" %%a in ('dir /b /a:d /o:-d 2^>NUL') do echo rmdir /s /q "%%a" popd endlocal :: --- BATCH SCRIPT END ---
|
|
wow thats awesome never thought that we can do such things |
I am trying to create a batch file that will clean a mapped drive out nightly at a set time. I will attach the batch file to scheduled tasks on the Server to clean out the folder the drive is mapped to. Here is the basic set up
C:\Test (folder the drive will be mapped to) net use \\serverxx\Test (the mapped drive to the Test folder) My clients will save their files to their local L:\ that is mapped to c:\Test. The c:\Test needs to be cleaned out at 11:00 nightly. Any help will be appreciated. |
dear sir
not useful this bach file i need a file thah working autometic copy file & hdd ful then delete autometic |
Thank you verymuch. I will use this to delete the files older than 30days.
|
U might want to download a freeware Backup software called Comodo.
It backup the files in sub-folders and after making a backup of the file, it will delete it. But be advice, the software will not delete the folders. bye. |
Hai,
Thanks for posting the delete folder batch file it helped me a lot tonight. |
Thank you for this, worked like a charm |
Hi,
I am still looking for a code (possibly DOS batch file) that will delete all of the older files in the c:\bkp folder and only keep the latest backup files that was named and timestamped by another batch file as 10172008_abc.bkp as an example. All of the backup files gets moved into this one folder from all of the servers. I could move first the 2 days old files to another folder that I could create, but even than I would have to delete them from that second backup folder adventually. Can you please email me the full code? Thank you! Maria |
Cool thanks I optimized it so when I clicked it it deletes what folders contents 1-7
or alows me to move it from one to the other.
|
Résultats pour Batch File To delete folders
Résultats pour Batch File To delete folders
Résultats pour Batch File To delete folders
Résultats pour Batch File To delete folders
Résultats pour Batch File To delete folders