Skip to content

Instantly share code, notes, and snippets.

@kevyworks
Last active August 29, 2015 14:10
Show Gist options
  • Save kevyworks/7d58e221675ef770da07 to your computer and use it in GitHub Desktop.
Save kevyworks/7d58e221675ef770da07 to your computer and use it in GitHub Desktop.
Youtube-dl Batch file
@echo off
CLS
SET "EXT="
SET "URL="
IF NOT EXIST "videos" md videos
IF EXIST "list.txt" (
GOTO :startbatch
) ELSE (
GOTO :startsingle
)
:startsingle
SET /P URL="Whats the video url?* "
IF "%URL%" == "" GOTO :nourl
SET /P EXT="What format? [ flv / mp4 ]"
IF "%EXT%" == "" SET EXT=%%(ext)s
youtube-dl.exe -o "videos\%%(title)s.%EXT%" %URL%
GOTO :end
:startbatch
SET /P EXT="What format? [ flv / mp4 ]"
IF "%EXT%" == "" SET EXT=%%(ext)s
youtube-dl.exe -a "list.txt" -o "videos\%%(title)s.%EXT%"
GOTO :end
:nourl
echo "[!] Url is not defined."
:end
echo.
echo Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment