Batch File - delete everything not modified in x days
I'm looking to do exactly what the title says via a batch file. I'd like to schedule this to run weekly on my FTP server.
I've tested this extremely simple line in a batch file:
del *.* /s /q
(delete all files, in all subdirectories, in quiet mode)
Although it says to delete *.*, it doesn't delete my folder directory structure, which is good because I have an FTP server with roughly 100 virtual ftp directories.
What I need to figure out is how to specify to only delete files that have not been modified in x amount of days. X will probably equal 14.
I'm currently trying to read some of the documentation I found on M$'s site, but I'm not having much luck understanding this stuff. Does anyone know how to do this? I'm not looking for a quick out, I'm trying to learn as well so an explanation of how the switches work, or just a link to a better tutorial to learn how to write these scripts myself would be GREATLY appreciated!
Thanks
__________________
40
|