I'm trying to create a batch program (here called pldl) to make downloading a playlist of songs with youtube-dl
easier, the program is
youtube-dl -o "%(playlist_index)s. %(title)s.%(ext)s" -x --audio-format "mp3" %1
which is supposed to just take the first argument (%1) and add it to this long command, so running command_name "playlist_url"
would download it in the location I ran it. Unfortunately, it throws an error instead (echo is on for debugging)
E:\Path\To\Music>pldl "https://www.youtube.com/playlist?list=PLSdoVPM5WnndV_AXWGXpzUsIw6fN1RQVN"
E:\Path\To\Music>youtube-dl -o "(title)s.1
Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
E:\Path\To\Music>
What's going on here? Why is the command not run properly as seen in the echo? Also is there possible a better way of doing this (tying a long command with argument to a short name) sorry for the low quality post just need this fast.