frbou
asked on
Delete files older than date
Hello,
I need to delete files that are older than a date.
Is there an easy way to do this with a batch file and the desired date as a parameter ?
Thanks.
Fred.
I need to delete files that are older than a date.
Is there an easy way to do this with a batch file and the desired date as a parameter ?
Thanks.
Fred.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I like a utility called XXCOPY. It can do exactly what you want without any fuss. (http://www.xxcopy.com)
My answer does the trick in a DOS only way.
if not exist _temp_.dat echo del "%%f"
To:
if not exist _temp_.dat del "%%f"
Actually delete the files.