Find the answer to your Linux question:
Results 1 to 6 of 6
I know how to use ls to output a playlist for mplayer if all the files are in the same directory but I was wondering if there was a way ...
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    91

    ls for mplayer playlist

    I know how to use ls to output a playlist for mplayer if all the files are in the same directory but I was wondering if there was a way to do this recursive.

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Does -R option help? if not how exactly are you producing the list?

  3. #3
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    I haven't tried it, but perhaps the find command could be helpful?

  4. #4
    Just Joined!
    Join Date
    Mar 2008
    Posts
    91
    Quote Originally Posted by Jonathan183 View Post
    Does -R option help? if not how exactly are you producing the list?
    this option does not work as it lists the folder then the files inside.

  5. #5
    Just Joined!
    Join Date
    Mar 2008
    Posts
    91
    Quote Originally Posted by D-cat View Post
    I haven't tried it, but perhaps the find command could be helpful?
    I just do not know how to use this command recursively.

  6. #6
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    It is recursive by default. Use grep to narrow your results to what's relevent.

    find | grep -i avi > avilist.pls

    will list all files in current directory notation ("./") from the current directory and all subdirectories with "avi" in the file or path name (case insensitive) and direct them to a file in the current directory called avilist.pls . The file may need some post editing in any text editor, but it'll make a reasonable quick and dirty playlist file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...