Computing.Net > Forums > Windows NT > Batch file to Delete Old Files

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

Reply to Message Icon

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.

Is there a Dos command that can do this?



Sponsored Link
Ads by Google

Response Number 1
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
Reply:

asm = assembler


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Batch file to Delete Old Files

delete old file www.computing.net/answers/windows-nt/delete-old-file/21829.html

Conditional FTP from Batch File www.computing.net/answers/windows-nt/conditional-ftp-from-batch-file/21343.html

How to delete NTFS www.computing.net/answers/windows-nt/how-to-delete-ntfs/9807.html