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 file to Delete Old Files
Name: joe Date: April 1, 2003 at 13:34:24 Pacific OS: Win NT CPU/Ram: N/A
Comment:
I don't know Dos, and I need to create a .cmd file that will delete files from a directory that are more than 72 hrs old.
Name: Maurice Reed Date: April 3, 2003 at 07:30:27 Pacific
Reply:
Just using command in a batch file won't do for this task. the DIR command can sort the files listing into date/time order but can't filter as such. A program written in C or even Pascal could fairly easily be written to get a directory listing and then compare the files date/time stamps against system time and then delete if the criteria is met.
You can use the Find->Files or folders tool from the start menu and use an 'advanced' find where you can set criteria such as file date/time stamps.
0
Response Number 2
Name: bitbyte Date: April 3, 2003 at 10:12:20 Pacific
Reply:
if you want i can send you a small asmprogram of mine for tihs problem
0
Response Number 3
Name: bitbyte Date: April 3, 2003 at 10:15:19 Pacific
Summary: Hi Rupali, Can you get the database to create a file if the flag is set? You should be able to create a spool file..... You could get the batch script to check for the existence of the spool file. T...
Summary: HELP.........I have windows NTServer4.0 installed in one of my partitions with NTFS. I want to delete NT server and I know one way to do it is by deleting the file system NTFS.How do I do that. I ha...