:: to delete the file named 'foo.txt' from all subdirectories of the current
:: working directory
:: run this command in the windows cmd.exe shell:
for /f %f in ('dir /d /b') do del /s /q %ffoo.txt
:: if 'foo' is a directory, the previous command merely empties the directory
:: to clean up and remove the empty foo directories afterwards run this command
for /f %f in ('dir /d /b') do rd /s /q %ffoo
[destination]rd [deleteable dir] /s
Like:
c:myFolder
d dirName /s