Windows has a Command Prompt which is very handy. When you attempt to execute any command, however, the command processor might display an error message saying “not recognized as an external or internal command span>”.
This is a common error. It is usually caused by an incorrect command execution.
Why was External Command Error not recognised as Internal or External?
Windows OS maintains a list referred to as Windows Environment Variables. This allows users the ability to quickly launch and execute programs..
- Incorrect commands.
- Registry errors can cause problems when using commands or other programs.
- Not installed executable programs or scripts.
- Uncorrectly entered path/filename
- Windows Environment Variables – A missing file directory
This error can occur when you run CMD commands (or programs) and something goes wrong. Please select the one most appropriate for your case.
1. Confirm that the program is installed
You can’t run a program that doesn’t exist in the Command prompt.
To confirm your installation
- Run will open by pressing Win+R. Type control, then click OK.
- From the Control Panel click on Programs > Programmes and Features.
- Scroll down the list until you find the app of your choice
An alternative way to view all installed applications is to go to Settings > Apps & Features and then click on Apps to locate it.
CMD searches the System32 directory for files and path information. CMD will return “not recognized”, indicating that the command processor has not detected the file as either an external or internal command.
This may be due to Windows not installing all apps in the System32 directory but C.Program Files.
There are 3 options for solving this problem:
- Before you can start the program, make sure that you have the entire path to it.
- Add the program path for Windows environment variable variables to the second step.
- Next, copy the files into the System32 directory.
2. You can use the Full Path File to execute the Command
Let us start with the fullpath method. To launch programs via Command Prompt, we will use the fullpath method.
- Sign in to the Command Prompt.
- Next, type the entire path of the app you wish to launch. This example can be opened: ESBCalc Port The address is C:\ directory. You will then see the command for opening an app with its full path.
- This method is not available if there are white spaces in your file paths.
3 Double Quotes: You can use the entire folder path
Command Prompt views white spaces following a command as its end and any other commands that follow it as separate commands.
Let’s say you want to launch the Internet Explorer app located in C:\Program Files\Internet Explorer\iexplore.exe via CMD. But, this file path will fail to launch because there is a space between Program Filesand Internet Explorer.
Avoid this by inserting a file path in a double-quote. The command that launches Internet Explorer will look like this:
4. Enter the file path to the Windows Environment Variables
Edit environment variables, and you can add your application file path to its directory. The Command Prompt can automatically identify the path to the requested command.
Fixing the Windows Environment Variable error is as easy as adding the entire file path to Flex, Nmake and Make.
To edit Windows Environment Variable
- To open Run, press Win + R.
- Next type control, then click OK to launch Control Panel.
- Go to Security > . In the left pane, click on Advanced System Settings
- Windows 10 — Newer versions: Go Settings>>> Click on Advanced System Setting, located under the Similar Settingssection
- In the Advanced Click on the tab Environment Variables button.
- Choose the pathvariable in the System variables menu from the new window.
- Click the Editbutton.
- Click on Edit in the Edit window Neu .
- You will need to paste the program path you want to use CMD. Chrome can be launched from the address C:\Program Files\Google\Chrome\Application, This is the complete file path.
- To make it Environment Variables click OK
- Next click OK in any open windows. This will save your changes.
Once you have added the environment variable, open Command Prompt. CMD will open your program by typing the name.
5. Move Files to System32 Folder
System32 is considered protected and therefore protected. A problem may occur if there aren’t all the programs installed within the System32 Folder.
To continue running the program using CMD, you will need to copy the program files into the System32 directory.
To copy program files from System32 to
- Navigate to the installation directory of your program and copy the files. Here, we will move Google Chrome files located in C:\Program Files\Google\Chrome\Application to the System32 folder.
- Go to the directory and copy all files.
- Next, click on Command Prompt and choose Open as Administrator. Click on Command Prompt to open as administrator. Type chrome, then hit enter. Google Chrome will immediately open.
CMD Not Recognized As Internal or External Command Error
Command prompts don’t require you to use capital letters, but it does not allow extra spaces. Add a environment variable to your file path to enable you to launch applications using CMD.