On Tue, Jan 22, 2008 at 01:52:11AM +1100, Sam Gentle wrote: > On Jan 22, 2008 12:59 AM, Daryl Thompson > <[EMAIL PROTECTED]> wrote: > > Hi > > > > I have 287Gb of my music still on an external HD in Windows Wma format > > in multiply directory's under a top directory of "wma" > > i wish to mass convert these files and do a little tidy up on them > > I have 3 main goals to achaive > > > > 1. Converting the wma to mp3 > > 2. Removing the wma after converting > > 3. removing the old desktop.ini files in these directory > > There's an awfully nifty utility called "find" that you can use > whenever you need to interact with directory trees recursively. > > I'll give you an example for your first problem, and the rest should > seem fairly obvious from there: > > find -type f -iname '*.wma' -exec wma2mp3 {} \;
Can I suggest to quote the {} just in case find -type f -iname '*.wma' -exec wma2mp3 "{}" \; > > Which means "find anything in this directory tree that's a file whose > name matches '*.wma' and then execute 'wma2mp3 <that file>'". > > Remember, with great power comes great responsibility! Before you run > any find commands you should first make sure you're doing what you > think you're doing. Especially don't trust find commands given to you > by some random guy from the internet. > > Changing -exec <blah> to -exec echo <blah> will show you what command > you're about to run on lots and lots of files. You may even want to > copy-paste one of the lines of echo output to your terminal to dry-run > it on just one file. > > Don't be too proud to double-check - I'm sure everyone here has a > great story or two about wiping their home directory. > > Oh, and as always, man find will bring great enlightenment and happiness. > > Sam > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > -- "Earlier today, the Libyan government released Fathi Jahmi. She's a local government official who was imprisoned in 2002 for advocating free speech and democracy." - George W. Bush 03/12/2004 citing Jahmi, who is a man, in a speech paying tribute to women reformers during International Women's Week, Washington, D.C.
signature.asc
Description: Digital signature
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html