Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Checklist
Question
I'm trying to make a batch file that creates an archive file named after the playlist within the folder -o creates (I'm using this btw: youtube-dl -o "%%(playlist)s/%%(playlist_index)s - %%(title)s.%%(ext)s")
so far I've tried:
1.Creating an archive within an arbitrary hierarchical path but later learned it only works with -o not with --download-archive
2.for /f "delims=" %%a in ('youtube-dl --get-filename -o "%(title)s.%(ext)s" %ytlink%') do @set archive_name=%%a
The purpose for which I'm trying this is so that I can download multiple playlists that share some common videos but still use the archive feature for each one
The error I'm getting is ERROR: fixed output name but more than one file to download
So the real question is how do I get the playlist name? I've already tried using "%%(playlist)s" instead of "%(title)s.%(ext)s" but that just crashes it
full batch file: (ignore the general_archive.txt, that's just something I'm using temporarily as a quick fix)
set /p ytlink=Enter Youtube Playlist link:
set archive_name=test
for /f "delims=" %%a in ('youtube-dl --get-filename -o "%(title)s.%(ext)s" %ytlink%') do @set archive_name=%%a
echo %archive_name%
PAUSE
youtube-dl -o "%%(playlist)s/%%(playlist_index)s - %%(title)s.%%(ext)s" -f "bestaudio" -i --download-archive "general_archive.txt" %ytlink%
PAUSE
sry if it's all over the place, I'm a newbie to programming languages :P