[MPlayer-users] scripting problem
Corey Hickey
bugfood-ml at fatooh.org
Sun Jan 5 07:22:39 CET 2003
Marcel Naziri wrote:
> hi,
>
> why is a script like this not working?
>
> for mov in `ls -1t`; do mplayer $mov; done
>
> to play the movies in directory sorted by date...
> mplayer complains e.g.
>
> Playing 08.mpg
> File not found: '08.mpg'
>
> but the file exists and something like
> for mov in 05.mpg 08.mpg; do mplayer $mov; done
> works.
>
> cheers
> zwobbl
Hmm, worksforme when all filenames concerned have no spaces.
A cleaner way would be to:
mplayer `ls -1t`
which plays the files as a playlist.
For files that have spaces:
ls -1t > playlist.txt ; mplayer -playlist playlist.txt
-Corey
More information about the MPlayer-users
mailing list