I am trying to write a simple command that searches through a music directory for all files of a certain type and copies them to a new directory. I would be fine if the files didn't have spaces.
I'm using a script from the following question, but it fails for spaces: http://stackoverflow.com/questions/2640260/bash-script-problem-find-mv-tilde-files-created-by-gedit
Any suggestions on how I can handle spaces, once I'm satisfied that all the files are being listed, I'll change echo
to cp
for D in `find . -name "*.wma*"`; do echo "${D}"; done