Trouble deleting with FORFILES

March 23, 2009 at 17:43:01
Specs: SERVER 2003
I am trying to use the FORFILES command in a batch script that will locate certain file types in a particular folder and then delete them. I have tried all the suggestions available on the web in various forums. When I run the script on the server, a command prompt window opens and the FORFILES command line from the batch file just repeats itself in the command prompt window. This continues until I close the window.

Any help would be greatly appreciated.

See More: Trouble deleting with FORFILES

Report •

March 24, 2009 at 00:14:50
one of the best tools in unix to do things like that is the find tool. It has since been ported to Windows, so if you can download it from here, you can use it to do what you want. go your your directory and execute
find -name "*.jpg" -delete

Report •
Related Solutions

Ask Question