I have already added the path to environment path variable.
But when I tried to execute it through cmd . I am getting the error
'youtube-dl' is not recognized as an internal or external command, operable program or batch file.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI have already added the path to environment path variable.
But when I tried to execute it through cmd . I am getting the error
'youtube-dl' is not recognized as an internal or external command, operable program or batch file.
You do not add specific programs to your path, you add the folder containing your programs.
You need to remove the youtube-dl.exe
from the end of highlighted line.
Create a new folder somewhere (except from C:\Windows\system32
or wherever-your-system32-is
)
Name it whatever you like,
eg.
C:\youtube-dl
Then move the youtube-dl.exe
inside it
C:\youtube-dl\youtube-dl.exe
Now, when adding it in your PATH
it should
be the name of the folder
eg.
Then, please, close any terminal/cmd that is/are open before trying it out.
In summary, the path
(folder directory
) to the .exe
is needed not the .exe
file when declaring it in your environment variables.
This is just to elaborate Mokubai's answer.