Computing.Net > Forums > Programming > batch file - deletes folders & more

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 - deletes folders & more

Reply to Message Icon

Name: jds123
Date: January 29, 2004 at 08:21:01 Pacific
OS: w2000
CPU/Ram: 256meg
Comment:

Hi there
I'm having trouble accomplishing the below.

I would like a batch file that will delete sub directories and the files contained in them, but it should keep the latest 10 sub directories.
example- c:\test\ contained in this directory are sub directories named jan012004,
jan022004...jan102004.

In the event of a new dir being added to c:test\ ie - jan112004, jan012004 should be deleted by the batch program. However if no new sub directory is added ie jan112004 the oldest sub directory should not be deleted by the batch program ie jan012004.

Thanks very much....



Sponsored Link
Ads by Google

Response Number 1
Name: dtech10
Date: January 31, 2004 at 06:29:48 Pacific
Reply:

Hi
What about the month change, would you still want to keep the last 10 days directories.



0

Response Number 2
Name: jds123
Date: February 4, 2004 at 07:13:00 Pacific
Reply:

Yes I would like to keep the last 10 days directories.

Thanks...


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Time in Java JAVA Disk Space calculato...



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file - deletes folders & more

Batch File deleting files by date? www.computing.net/answers/programming/batch-file-deleting-files-by-date/15581.html

Batch file delete file by file name www.computing.net/answers/programming/batch-file-delete-file-by-file-name/16849.html

batch file delete itself www.computing.net/answers/programming/batch-file-delete-itself/17243.html