1- Open up Terminal
2- In the command line, cd to/your/directory
3- Finally, in the command line, type: find . -name '.DS_Store' -type f -delete
. Press enter.
Warning: Never use a wildcard (*) with this command, unless you know what you're doing. Bad things can happen if you don't.