I believe a batch file with FOR loops will be needed, not any one single command will work. I needed to write one to delete every subdirectory in a directory. You batch file would be similar but you would need to test for the name of the directories and travel down each subdirectory. For a while I did look for a third party RD command to accept wild cards but if we quicker for me to write my own. However, my situation was simple.
–
Scott McClenningOct 5 '10 at 18:32

What if I want to delete all folders with a certain name anywhere in the sub-tree, but starting at a certain root folder. E.g. delete all folders named TestResult within C:\Projects` and all subdirectories? Found the answer - example 4 of the Remove-Item` command explains it: get-childitem C:\Projects\* -include TestResults -recurse | remove-item
–
PatOct 11 '10 at 21:00

Share the folder. Connect to the share with linux. Use ls to generate a list of files. Open up your favorite text editor and edit the list. Add del to the front of each line. Replace all / with \ and change the path from /cache to E:\ . Add quotes around each path to protect against the ^ in the filename and change all % into %%. Copy the contents into a .bat file and execute.