Skip to content

Instantly share code, notes, and snippets.

@codyopel
Last active March 9, 2023 08:34
Show Gist options
  • Save codyopel/7872c326ec04b41a32ff to your computer and use it in GitHub Desktop.
Save codyopel/7872c326ec04b41a32ff to your computer and use it in GitHub Desktop.
youtube-dl batch script
ECHO OFF
TITLE youtube-dl
where /q youtube-dl || echo ERROR: youtube-dl not found
CD %userprofile%\Downloads || GOTO:error
CLS
ECHO.
ECHO Download directory: "%CD%"
ECHO.
SET /p videoURL=Enter video URL:
youtube-dl --max-quality --no-check-certificate --prefer-insecure --console-title -o %userprofile%\Downloads\%%(title)s.%%(ext)s %videoURL%
CMD /F:ON /Q /K
GOTO:EOF
:error
ECHO.
ECHO Press any key to exit.
PAUSE >nul
GOTO:EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment