My youtube-dl batch scripts for Windows

These scripts require:

Download a playlist

Download a playlist and sorts the videos in the same order they were added to the playlist. Makes a folder with the name of the playlist and puts all videos in there.

@echo off
set videolink="https://www.youtube.com/playlist?list=XXXXXXXXXXXZz8toIkm3-ehTuqeXXXXXXX"

title Youtube-dl %videolink%
color E0
pushd %~dp0
cd /d %~dp0
echo Directory: %~dp0

start /w python.exe -m pip install --upgrade pip
start /w python.exe -m pip install --upgrade youtube-dl

youtube-dl ^
--download-archive list.txt ^
--write-info-json ^
--write-annotations ^
--write-thumbnail ^
--write-all-thumbnails ^
--write-sub ^
--all-subs ^
--embed-thumbnail ^
--convert-subs srt ^
--console-title ^
--ignore-errors ^
--output "%%(playlist_title)s\%%(playlist_index)s - %%(title)s.%%(ext)s" ^
"%videolink%"

If the playlist is private you need to put a cookie file in the same directory as the script. and add --cookies cookies.txt ^.

Be careful: your account may be blocked if you use --cookies too many times. At least for me my account was blocked for a couple of minutes and I had to delete all cookies and login again.