I must have written the following batch file some time ago.
Can anyone explain if this is more efficient then just running a
del /[d-15,1/1/80] /s /y http\...\upload\*.jpg
Is there a performance gain running against a file list?
additionally can you recommend a way to not log 0 files deleted 4000 times and only show the actual deleted files.
And last but not least is there a way for these logs to show the total number of files deleted and bytes freed.
I am needy <G>... Thanks either way
sample of log snippet
0 files deleted
Deleting D:\Photogra\UploadTool-PRO\upload\VENTURA\hi-res\8613945.JPG
Deleting D:\Photogra\UploadTool-PRO\upload\VENTURA\hi-res\8613947.JPG
2 files deleted 1,052,672 bytes freed
Can anyone explain if this is more efficient then just running a
del /[d-15,1/1/80] /s /y http\...\upload\*.jpg
Is there a performance gain running against a file list?
Code:
@echo off
d:
cd\
cd http\domain\uploadtool-pro\upload
dir /a:d /b >c:\scripts\cleanupdir\dirlisting.txt
for %files in (@c:\scripts\cleanupdir\dirlisting.txt) del /[d-15,1/1/80] /s /y %files\hi-res\*.jpg >>e:\logs\cleanupdir\%_month%-%_day%-%_year%cleanup.log
exit
additionally can you recommend a way to not log 0 files deleted 4000 times and only show the actual deleted files.
And last but not least is there a way for these logs to show the total number of files deleted and bytes freed.
I am needy <G>... Thanks either way
sample of log snippet
0 files deleted
Deleting D:\Photogra\UploadTool-PRO\upload\VENTURA\hi-res\8613945.JPG
Deleting D:\Photogra\UploadTool-PRO\upload\VENTURA\hi-res\8613947.JPG
2 files deleted 1,052,672 bytes freed