xspf - audicious - won't play playlist

Heike C. Zimmerer nospam08q2 at gmx.net
Sat May 23 08:22:02 UTC 2009


Michael Casey <michaelcasey73 at gmail.com> writes:

> so if I want to generate an m3u file, what also makes correct m3u for the
> subdirectories:
>
> for DIRNAME in $(find . -type d); do cd $DIRNAME; find . -maxdepth 1 -name
> "*.mp3" -type f > "Playlist_${PWD##*/}".m3u; done
>
> Thats working.
> But: What happends when the folder "can not be accessed with a cd command",
> eg.: it has spaces in the name:
>
> $ cd ./Queen [1973-1995]/1989 - The Miracle
> $ bash: cd: ./Queen: No such file or directory

find "$PWD" -type d \
| while IFS= read dirname; do
  cd "$dirname"
  find "$PWD" -maxdepth ... etc ...
done

will handle spaces just smoothly (but not newlines in file names) and
return absolute paths (note the "$PWD" instead of '.').

Heike





More information about the ubuntu-users mailing list