How to store the output filename and extension as a variable after downloading the movie using youtube-dl and use it later in CMD batch? The following is an example of a command to download a video from YouTube to the current directory where
URL is the URL of the video.
Store the output filename in a variable called
Edit: To be completely specific I want to download a video with youtube-dl using a simple cmd batch file that will provide a CHOICE command at the end with option to open the output file with MPC-HC.
I need the method of putting into a variable the output of
youtube-dl --get-filename -o "%(title)s.%(ext)s" URL
so I can use it later for the following line
"C:\Program Files\MPC-HC\mpc-hc64.exe" "D:\Downloads\%my_variable%" /play