Link to home
Start Free TrialLog in
Avatar of AgsWin99
AgsWin99

asked on

Bat file needed to delete files that are 5 days old or older

I need an example of how to write a bat file that will be executed everyday or so that will delete all files in a specific directory that are 5 days old or more.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of vemul
vemul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vbranger
vbranger

mmm... using filesystemobject is a good idea! may i also add at this point that the DOS "AT" command can be used to schedule the final exe that takes care of this deletion!
-------------------------------------------------------------------------------
Dear questionner/expert(s)

No comment has been added lately, so it's time to clean up this TA.
I'll leave a recommendation in the Cleanup topic area that this question is to be:

- answered by: vemul

Please leave any comments here within the next seven days.

==> PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER ! <==

CalebS

Cleanup volunteer
-------------------------------------------------------------------------------
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
I'd like to use this myself. Here's a stupid question. What language is the accepted anwer program in? I'd like to put a sleeper line in there so I can see what the DOS prompt is saying. This is something I'd like to learn more about rather than straight web programming.

Thanks,
goevan.