Table of Contents
If you get the “not recognized as an internal or external command” error on Windows 11/10’s Command Prompt, it could be because the Windows Environment Variables aren’t set up right. One of the best things about Windows is that you can do a lot of things from your computer’s Command Prompt. Just type cmd.exe and Windows will run it for you.
But you might see errors like “is not recognized as an internal command” every once in a while. Even a small mistake can make the command useless and cause error messages to appear. You can also go to the official Microsoft support site to know more information about this error.
This is one of the most common things that can go wrong when you use the Command Prompt. As the error message says, the Command Prompt couldn’t figure out what tool you were trying to use. There are many reasons why the “not recognized as an internal or external command” error appears on your Windows PC, and there are also many ways to fix it.
Ways to Fix “not recognized as an internal or external command” error
Use the Full File Path to Execute the Command
Let’s start by using the full path method. Here, we will launch programs from Command Prompt by using the full file path instead of the app name. Here’s what you need to do:
- First, open the Command Prompt as administrator.
- Next, type the full path of the application you want to launch. For example, if you want to open the ESBCalc Port located in the C:\ directory, then the command to open the app with the full path will look something like this:
C:\ESBCalcPort.exe
- That said, this will only work if the file path does not have any white spaces. If your file path has a space, type the file path inside double-quotes.
Use the Full File Path Within Double Quotes
- Command Prompt reads the white space as the end of a command and treats everything after the space as a separate command.
- Let’s say you want to use CMD to run the Internet Explorer program, which is in C:Program FilesInternet Exploreriexplore.exe. But this file path won’t work because there is a space between Program Files and Internet Explorer.
- To stop this from happening, you can put the file path inside double quotes. This is how the command to open Internet Explorer will look:
"C:\Program Files\Internet Explorer\iexplore.exe"
Verify if the Program Is Installed
A program that doesn’t exist can’t be run by Command Prompt. If you want to run a program that you just installed, make sure it was installed correctly. To make sure the job was done right:
- Press Win + R to open Run. Then, type control and click OK.
- Then, in the Control Panel, go to Programs > Programs and Features.
- Scroll through the list of installed apps and locate the app you want to run.
- Alternatively, you can also view installed apps by accessing Apps and Features in Settings. To do this, press Windows key + I, click on Apps and locate the installed app.
By default, when you use CMD to run a program or script, the command processor looks in the System32 folder or environment variables for the related files and paths. If the file is missing, it will give the error not recognized as an internal or external command, operable program, or batch file.
This is probably because Windows doesn’t put most programs in the System32 folder. Instead, it puts them in C:Program Files. There are three ways to deal with this problem:
- First, use the full path of the executable file to launch the program.
- Second, add the program path to Windows environment variables.
- Finally, move the files to the System32 folder.
Add the File Path to the Windows Environment Variables
You can change the Environment Variables and add the file path to the directory of your application. This way, Command Prompt will be able to find the command’s path and run it without giving an error.
You can fix the “not recognized as an internal or external command” error for the Flex, nmake, make, cobra, Is, terraform, gcc, code, Android Studio, Python, Fastboot, and ADB commands by adding a full file path to the Windows Environment Variable. To change a Windows Environment Variable:
- Press Win + R to open Run.
- Next, type control and click OK to open the Control Panel.
- In Windows 10, Go to System and Security > System. In the left pane, click on Advanced System Settings.
- On newer versions of Windows 10 and Windows 11, go to Settings > System > About. Then, click on Advanced system settings under the Related settings section.
- In the Advanced tab, click on the Environment Variables button.
- In the new window, under System variables, select the Path variable.
- Click the Edit button.
- In the Edit window, click on New.
- Here, you have to paste the program’s file path you want to run from CMD. For example, if you want to run the Chrome browser located in C:\Program Files\Google\Chrome\Application, then the full file path will look like this:
C:\Program Files\Google\Chrome\Application
- Click OK to add it to the Environment Variables.
- Then, click OK again.
- Next click OK and Apply to save the changes.
Once you’ve added the new variable, you’ll need to restart your PC for the changes to take effect. After the PC restarts, open Command Prompt, type in the name of the program, and CMD will open it without any problems.
If commands like ipconfig, netsh, cipher, etc. don’t work right, add the file path to the Windows system root folder in the Environment Variables dialog. Here’s what you need to do.
- Open the Environmental Variables dialog.
- Next, select the Path variable under the System variables section and click on Edit.
- Click New and paste the following:
%SystemRoot%\system32
- Click OK to save the changes.
- Click OK, and then click OK and Apply to save the changes.
FAQ
Why is not recognized as an internal or external command?
At the Windows command prompt, the message “Python is not recognized as an internal or external command” shows up. The error happens when the Python command in the Windows command prompt does not find the executable file in an environment variable.
What is internal or external command in CMD?
An internal command is part of the COMMAND.COM file, while an external command is not and needs a separate file to work. For instance, if your computer doesn’t have the fdisk.exe file and you try to use the fdisk command, you will get an error message saying “Bad command or file name.”
Which command is external command?
External commands are commands that have already been set up for end users. They work with any operating system and are protected by permissions. This means that normal end users can only schedule commands that the system administrator gives them permission to.