Re: [SLUG] filenames with spaces

From: Backward Thinker (backwardthinker@juno.com)
Date: Fri May 07 2004 - 08:21:34 EDT


> I have a bunch (several hundred) of .wma files that I want to
> convert to ogg or mp3. So I wrote a script to find and process
> each file.
>
> The problem is that there are spaces in the file and directory
> names which I inherited from a windows machine.
>
> Currently my script looks like this:
>
> for File in "`find $Dir -name '*.wma' -print0|xargs -0 ls`" ;do
> echo " $File"
> #mplayer -ao pcm "$File"
> done
>
> The problem is that it processes the whole bunch first time
> through, not one at a time which is of course what I need.

I think you are making this way too complicated. Have you tried
something like:

find $DIR -name '*.wma' -exec mplayer -ao pcm {} \;

find with -exec is a very useful tool.

~ Daniel

________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:52:43 EDT