|
Answer» Hi there,
Would it at all be possible to create a batch file in XP that would do a search in a specified location for any files that have a 'created/modified' date older that say a month. And then delete the files found. Any help greatly appreciated. Craig.Write dir COMMAND output to a file. Then search the file using findstr command and get the file name. Use delete command to delete the file.
Hope this helps JothishTry XXCOPY (a freeware for personal use)
http://www.xxcopy.com/
It is a general purpose file management tool that can copy, delete, list, etc. The command syntax is compatible with that of XCOPY. It offers a wide variety of file-selection mechanisms that includes file size, file date, AGE, attributes, etc. just to name a few.
E.g.,
xxcopy "c:\My Documents\*.doc /rs/s/db#30 // 30 days or older xxcopy c:\ /rs/s/db:1998-04-30 // files made Apr,98 or before Hi chaps, thanks for your replies.
xxcopy seems to do just the trick. although i would also like to be able to do it in a batch file also. Is it possible to use dir to list files of a certain age? then i COULD output to another folder and delete.you can call xxcopy from a batch file if you put the xxcopy executable somewhere on your PATH.
|