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 {} \; 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