master7045
Senior member
I need to write a script that will delete files in a directory that are older than 90 days. I found an exe that does this very will (delold.exe), but alas it doesn't work in Server 2000. I'm very new to batch, but have created some basic distro commands and such, so my feet are wet, so to speak.
I'm having a bit of trouble with the forfiles command though. Here is what I have:
FORFILES /P C:\NSB\Coalition\EDU\Backup\ /m *.* /d -90 /c "del /q /f"
When I run this, I get "ERROR: The system cannot find the file specified." I think this has something to do with my switch "/m *.*" Anything in this directory older than 90 days is useless, so I want to delete everything, not just specific file types. Any help is appreciated!
I'm having a bit of trouble with the forfiles command though. Here is what I have:
FORFILES /P C:\NSB\Coalition\EDU\Backup\ /m *.* /d -90 /c "del /q /f"
When I run this, I get "ERROR: The system cannot find the file specified." I think this has something to do with my switch "/m *.*" Anything in this directory older than 90 days is useless, so I want to delete everything, not just specific file types. Any help is appreciated!