I made a batch file which contains:-
set /p ytlink="Enter the link of Youtube Video:- "
youtube-dl -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" ytlink
pause
But the output i got is:-
ERROR: 'ytlink' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:ytlink" ) to search YouTube
My aim is to make a batch file in which i can enter youtube link which it will download.
You currently simply pass the text ytlink
to youtube-dl. To pass the content of the ytlink
variable, use %ytlink%
.
set /p ytlink="Enter the link of Youtube Video:- "
youtube-dl -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" %ytlink%
pause