Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Deleting files older than 30 days.
Name: VK200 Date: August 13, 2003 at 05:31:07 Pacific OS: win 2k CPU/Ram: 536 MB
Comment:
Hi, How to delete the files older than 60 days from a folder say 'temp' using dos commands ? Should I use a batch file or can make it with pipes?
(I don want to use any utility or 'C' programs) Please throw me some light in this regard,
Name: Secret_Doom Date: August 13, 2003 at 11:57:29 Pacific
Reply:
There is absolutely no way you're going to do this with a single command built in a microsoft command interpreter. CMD.exe is far from having such capabilibites.
An external solution is required, wether written in batch, C, assembler or whatever. There are even command interpreters compatible with Windows that can do the described task with internal commands. But Microsoft itself doesn't seem to have thought about that when making its command prompts, so far (who knows, maybe on an upcoming version of windows...)
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com www.batch.hpg.com.br
0
Response Number 2
Name: TheONE Date: August 26, 2003 at 11:35:11 Pacific
Summary: I need to come up with a .bat file that will automatically delete files of a certain age from any directory which is passed to it as a parameter. The .bat job should check for the dates of the files ...
Summary: @Echo Off Cls Rem File : Del_Files_Older_Then.Bat Rem Target : delete txt.files older than 4 day Rem Logfile : Rem Files : Find.Exe, Rm.Exe (posix Dir NTresKit) Rem Copywrong : Sonny P....