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.
Batch scrip to delete
Name: kalyani Date: July 17, 2008 at 12:17:38 Pacific OS: XP CPU/Ram: intel Product: 2006
Comment:
Hi ,
I have to delete files from a network drive..(which is accessible from my system)via a batch script, that are older than 3 days...the file name is a system generated number with .txt extension like below..
R76798667535778.txt R76798343334442.txt
I have to run the batch script every day which has to delete files older than 3 days from the network drive..how can i do this in .bat programing..
i.e., Google alt.msdos.batch for "delete old files."
rprgrmr
0
Response Number 2
Name: Mechanix2Go Date: July 18, 2008 at 00:00:31 Pacific
Reply:
Nobody has managed to do it here in the last few years.
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 3
Name: FishMonger Date: July 18, 2008 at 00:13:03 Pacific
Reply:
You'll need to use a more appropriate language that has the capability of doing date calculations, such as Perl or Python, or VB.
0
Response Number 4
Name: ghostdog Date: July 18, 2008 at 00:28:04 Pacific
Reply:
@OP, you can use find command from findutils for windows if you are able to install it. See here: http://gnuwin32.sourceforge.net/pac... it will make you life easier
Summary: Is it possible for a batch script to delete a single line in a txt file? example: my.txt contains the following: ab cd is it possible to delete cd using batch? ...
Summary: Hi I am trying to get a batch file to delete files which has dates older than 7 days so far I have @ECHO OFF CLS FOR /R C:\User_share %%FILE IN (*.*) DO ( ECHO starting if IF(0 == (ISDATE %%~zFILE bef...
Summary: I am trying to write a small batch file to delete a type of file (*.ptl) in a directory and all subdirectories, here is what I have: del D:\directoryname\ /S *.ptl however, the return gives me somethi...