Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows

Yes, this case happens very often, especially for those who install many programs, programming applications such as Java, set up their own servers... which directly affects the Windows Environment. That is the error:

  • 'cmd command syntax' is not recognized as an internal or external command, operable program or batch file.

This error phenomenon is that if you type any command syntax into CMD - Windows Command, such as Ping, ipconfig... you will receive the above error message.

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows

So how to fix this error "is not recognized as an internal or external command...". Please refer to the article below of WebTech360!

See more reference articles about basic commands in CMD here.

What causes this "is not recognized as an internal or external command..." error on Windows?

As mentioned above, this error occurs when you install programs that affect the Windows Environment Variables section such as programming applications, server creation... When these environment variable values ​​change, it will cause "misunderstanding" or confusion when Windows executes a program or command.

How to fix the error "is not recognized as an internal or external command...":

Verify that the program is installed

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows
Verify that the program is installed

Command Prompt cannot run a program that does not exist. If you are trying to run a newly installed program, make sure it was installed correctly.

To verify the installation:

1. Press Win + R to open Run . Then type control and click OK.

2. Then, in Control Panel , go to Programs > Programs and Features .

3. Scroll through the list of installed apps and find the one you want to run.

Alternatively, you can also view installed apps by going to Apps and Features in Settings. To do this, press Windows key + I , click Apps and find the installed app.

By default, when you try to launch a program or a script from CMD, the command prompt looks for relevant files and paths in the System32 folder or environment variables. If the file is missing, it returns an error "is not recognized as an internal or external command, operable program or batch file".

This may be because Windows does not install most applications in the System32 folder, but instead in C:\Program Files.

You can solve this problem in three ways:

1. First, use the full path of the executable file to launch the program.

2. Second, add the program path to the Windows environment variables.

3. Finally, move the files to the System32 folder.

Use full file path to execute command

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows
Use full file path to execute command

First, let's try the full path method. Here, we'll use the full file path instead of the application name to launch programs from Command Prompt. Here's how to do it:

1. First, open Command Prompt with admin rights .

2. Next, enter the full path of the application you want to launch. For example, if you want to open ESBCalc Port located in the C:\ folder , the command to open the application with the full path would look like this:

C:\ESBCalcPort.exe

3. However, this will only work if the file path does not have any spaces. If your file path has spaces, enter the file path inside double quotes.

Use full file path in quotes

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows
Use full file path in quotes

Command Prompt reads spaces at the end of a command and treats anything after the space as a separate command.

Suppose you want to launch the Internet Explorer application in C:\Program Files\Internet Explorer\iexplore.exe via CMD. However, running this file path returns an error due to the space between Program Files and Internet Explorer .

To avoid this, you can enclose the file path in double quotes. Here, the command to launch Internet Explorer would look like this:

"C:\Program Files\Internet Explorer\iexplore.exe"

Add file path to Windows Environment Variables

You can edit the Environment Variables and add the application's file path to its folder. This way, Command Prompt will determine the path for the entered command and execute it without error.

Adding the full file path to Windows Environment Variable can help you resolve the “not recognized as an internal or external command” error for Flex, nmake, make, cobra, Is, terraform, gcc, code, Android Studio, Python, Fastboot, and ADB commands.

To edit the Windows Environment Variable:

1. Press Win + R to open Run.

2. Next, type control and click OK to open Control Panel .

3. Go to System and Security > System . In the left pane, click Advanced System Settings .

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows
Click Advanced System Settings

4. On newer versions of Windows 10, go to Settings > System > About . Then, click Advanced system settings under Related settings.

5. In the Advanced tab , click the Environment Variables button.

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows
Click the Environment Variables button

6. In the new window, under System variables , select the Path variable.

7. Click the Edit button.

8. In the Edit window , click New.

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows
Click New

9. Here, you have to paste the file path of the program that 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 path of the file will be like this:

C:\Program Files\Google\Chrome\Application

10. Click OK to add it to Environment Variables.

Then click OK on all open windows to save the changes.

Once you have added the new environment variable, open Command Prompt , type the program name and CMD will open it without any errors.

Move the file to the System32 folder

Instructions to fix the error “not recognized as an internal or external command” when using CMD in Windows
Move the file to the System32 folder

System32 is a protected system folder and it is protected for a good reason. When you try to run a program with admin rights, Command Prompt will look for the executable file in the System32 folder. However, since all programs are not installed in the System32 folder, you may get an error.

If you still want to run the program from CMD and don't want to type the full file path, you can move the program file to the System32 folder.

To move program files to the System32 folder:

1. Navigate to the installation folder for the program and copy all the files in the folder. Here, we will move the Google Chrome files located in C:\Program Files\Google\Chrome\Application to the System32 folder.

2. Next, navigate to the C:\Windows\System32 folder and paste the copied files. Click Yes if the UAC prompt appears.

3. Next, open Command Prompt with admin rights, type chrome and press Enter. CMD will immediately open Google Chrome browser .

Good luck!

Leave a Comment

Outlook Inbox Repair Tool

Outlook Inbox Repair Tool

The Outlook Inbox Repair Tool fixes corrupted PST files quickly so you can recover emails and restore normal Outlook function. Follow these exact steps to run scanpst.exe without data loss.

Adobe PDF Installer Offline

Adobe PDF Installer Offline

Get the Adobe PDF Installer Offline to install Acrobat Reader on any PC without needing internet during setup. Follow these exact steps for the full standalone package.

How to Chromecast from Laptop to TV

How to Chromecast from Laptop to TV

Learn how to Chromecast from laptop to TV with this step-by-step guide. Stream browser tabs, videos, or your full screen from Windows or Mac to your TV in minutes.

How to Edit an Adobe PDF File

How to Edit an Adobe PDF File

Learn how to edit an Adobe PDF file in Adobe Acrobat with precise steps for text, images, and layout changes. Make professional edits quickly and save time.

Free Foxit Reader Free Download

Free Foxit Reader Free Download

Get your Free Foxit Reader Free Download from the official source with this step-by-step guide that ensures a safe and quick installation for viewing PDFs.

How to Get Help in Windows 11

How to Get Help in Windows 11

Learn how to get help in Windows 11 with built-in tools like the Get Help app and Quick Assist for fast, official support without third-party downloads.

How to Retract an Outlook Email

How to Retract an Outlook Email

Learn how to retract an Outlook email in Microsoft Outlook when you need to correct a mistake before the recipient opens it. Follow these precise steps for Exchange accounts.

How to Chromecast in Samsung TV

How to Chromecast in Samsung TV

Learn how to Chromecast in Samsung TV by connecting a Chromecast device and streaming from your phone or computer in just a few minutes.

Adobe Acrobat DC Reader Free Download

Adobe Acrobat DC Reader Free Download

Get the official Adobe Acrobat DC Reader free download safely. Follow this step-by-step guide to install the latest version for viewing and editing PDFs on Windows or Mac.

How to Update to Win 11

How to Update to Win 11

How to Update to Win 11 from Windows 10 safely with this detailed guide. Check requirements, run the upgrade, and enjoy new features and better security on compatible hardware.