Note: I am sorry if I posted this in the wrong stack exchange website. I have seen similar questions on this website. Please correct me if it was wrong.
So I installed VLC into the directory D:\misc\vlc and when I type "vlc" into command prompt, it starts the VLC media player. However, I want to run this "vlc" command in the directory D:\slam\ . However, every time I do that, it says that "'vlc' is not recognized as an internal or external command, operable program or batch file.".
Is there a way to run the 'vlc' command in any directory?
Any help is appreciated.
You can add the vlc
program to the PATH in Windows using the "Edit Environment Variables" dialog. Assuming Windows 10 (though this dialog is present in older versions too), here is how to add a program to the PATH:
- Open the Start Search, type in “env”, and choose “Edit the system environment variables”
- Click the “Environment Variables…” button.
- Under the “System Variables” section (the lower half), find the row with “Path” in the first column, and click edit.
- The “Edit environment variable” UI will appear. Here, you can click “New” and type in the new path you want to add. From this screen you can also edit or reorder them.
- Dismiss all of the dialogs by choosing “OK”.
- Your changes are saved! You will probably need to restart apps for them to pick up the change. Restarting the machine would ensure all apps are run with the PATH change.
In step 4 above, the new path that you will type is the directory containing the vlc
program, e.g. "D:\misc". Note that adding this directory will also make any other programs inside of the "misc" directory accessible as well.