Hello
I created a script that deletes files that are more then 8 days old this is the script
forfiles /p H:\DATA\SCANS\ /s /m *.* /d -8 /c "cmd /c del echo @FILE"
I am running this script on multiple servers and it works on all but one of them. On the server that the script fails on I get an error that it could not find
H:\DATA\SCANS\echo
Script to delete files
Moderator: DosItHelp
Re: Script to delete files
maybe del @FILEcartoonjunkie wrote:del echo @FILE
-
- Expert
- Posts: 442
- Joined: 01 Aug 2010 17:13
- Location: Canadian Pacific
- Contact:
Re: Script to delete files
Why do you need to "cmd /c del echo @FILE" instead of just "cmd /c del @FILE"?
"del echo" doesn't make sense, it's trying to delete a file named echo.
"del echo" doesn't make sense, it's trying to delete a file named echo.