Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating archive at an arbitrary hierarchical path #26789

Open
SubZD opened this issue Oct 3, 2020 · 0 comments
Open

Creating archive at an arbitrary hierarchical path #26789

SubZD opened this issue Oct 3, 2020 · 0 comments
Labels

Comments

@SubZD
Copy link

@SubZD SubZD commented Oct 3, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

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

@SubZD SubZD added the question label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.