youtube-dl how to download multiple playlists in individual folders

If downloads.txt contains one url per line try:

cat downloads.txt | xargs -n1 youtube-dl -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s'

In case people from the future stumbled upon this post, I've found a solution working on Windows. Don't know about other OS though.

In your x:\Users\USERNAME\ , create or edit a file named youtube-dl.conf and paste the commands below. This would always run in youtube-dl so you don't have to type it in the terminal. For more info about the config file.

-o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s'

After that, create a text file containing the playlist links separated by a line and run this.

youtube-dl --batch-file=downloads.txt

After downloading, you're free to delete the commands in youtube-dl.confif you don't need it.