One of the great things about Windows is that you can perform many tasks from the command line on your computer. You just need to type cmd.exe and Windows will launch it for you. But sometimes you may run into errors like “not recognized as an internal command”.
In fact, this is one of the most common errors you may encounter on the command line. As the error itself suggests, it was unable to recognize the tool you were trying to use from the command line. This happens for a variety of reasons, and there are several ways to work around the “not recognized as an internal or external command” error on your Windows PC.
The reason for a “not recognized as an internal command” error
Before you start applying the fixes, we recommend that you investigate why the error occurred to make sure it won’t happen again in the future.
Other applications mess up your system
One of the most common reasons you might receive this error on your PC is because another installed application has changed your system variables. This prevents the command line from recognizing commands to launch other applications or tools.
The program is not installed on your computer
The second possible reason for the “not recognized as an internal or external command” message is that the appropriate program is not installed on your computer. The installer may not have installed the application files in the correct location, or the installer may not have allowed the tool to run from the command line.
Fix “Not recognized as internal or external” error in Windows
Regardless of the reason, there are ways to fix this error and get the command line to recognize the program you are trying to use.
– / pre>
Make sure the program actually exists on your computer
The first thing to do is check if the program you are trying to use from the command line actually exists on your computer. You may have used a fake installer that informed you that the program was successfully installed on your computer, but this may not be true.
There is an easy way to check if the program is actually installed on your computer.
- Launch an Explorer window on your PC.
- Go to the next path.
C: Windows System32
- Make sure the executable you are trying to run from the command line is available in this folder. Otherwise, the program is most likely not installed on your computer.
The above is not the correct way to check if the program is installed on your computer. This is due to the fact that not all programs store their files in the Windows System32 folder. However, this should help you find most programs.
Use the full path to the executable
The “not recognized as an internal command” error usually occurs because the computer cannot find the executable file you are asking to run. However, you can give it the full path to the executable and then it can run it without any problem.
- Launch a command prompt window on your PC.
- Enter the full path to the executable you want to use and press Enter on your keyboard.
- For example, if you are trying to use adb.exe located in the adb folder on your desktop, enter something like the following.
C: Users
Desktop adb adb.exe
- The file should run without problems.
Enclose the file path in double quotes
Specifying the full path to the executable is not a reliable method. It can also cause an “not recognized as an internal or external command” error if used incorrectly. The problem is with the path you provide in the command prompt window.
If there are spaces in the full path to your executable, this will result in an error. This is because the utility cannot recognize spaces and uses characters up to the first space as the program name. Since this is the wrong path, you will receive the above error.
You can fix this using the following method.
- When entering a path that contains spaces (single or multiple), enclose the path in double quotes.
- The command line will then recognize the entire path as a single item and run the program on your computer accordingly.
Move file to System32 folder
By now, you know that when you try to run an executable from a command line utility, it looks at the System32 folder of your Windows installation and then opens the file if available there.
What if you could put your executable in there and then access it from the command line? You can do this if you have administrator rights on your computer.
- Copy the executable file, along with all other files associated with it, to the following folder on your computer.
C: Windows System32
- Close the command prompt if it was already open and restart it.
- Enter the name of the executable file without specifying the path, and you will see that it starts successfully.
While this method works great and helps fix the “not recognized as an internal or external command” error on your computer, you can use it carefully.
This is because every time you want to use something from the command line, you will need to put the corresponding executable in the System32 folder. Eventually, the folder will grow and contain a large number of files.
It will also not work with executable tools that require installation in a specific directory. You won’t be able to move them to the System32 folder because the installation path is defined in the Windows registry.
We recommend using this solution only if you cannot solve the problem with other methods and while the application does not require installation.
Add executable file path to environment variables
The most efficient way to fix the “not recognized as an internal command” error is to edit the environment variable and add the appropriate file path there. This is because the command line utility looks at these paths when you enter a command and then opens the file if it finds it in one of these directories.
By adding a file path there, you tell the command line where a particular executable is located when you want to use it by its short name in the CMD window.
It’s pretty easy to edit the variables and add a new path there.
- Launch Control Panel by searching for Cortana on your PC.
- Click the System and Security option.
- Find and click “System” on the next screen.
- Select Advanced System Settings from the left side panel of your screen.
- A window will open on your screen. Click the Environment Variables button at the bottom of the field.
- You will see all the custom variables for your account. Click on the one that says “Path” and then click on the “Edit” button.
- Now you can add a new path to the application you want to use with the command line. Click “Browse” on the right sidebar to add the directory to the list.
- Go to the folder where your executable is located and select it.
- You should see that your newly added path is listed in the variable list. Click “OK” at the bottom to save your changes.
- Click OK on all other windows when you close them.
- Open a Command Prompt window and enter the name of the executable file. You will see that the file opens and CMD does not display any errors.
The “not recognized as an internal command” error can sometimes be very frustrating because it prevents you from using a program that you know you have installed on your computer.
Using the methods described above, you will be able to get rid of this error and run any program from a command prompt window without any problems. If any of the above methods helped you fix the issue, we’d love to know about it in the comments section below.
–