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

How to Use Windows 11 Quick Assist for Help

How to Use Windows 11 Quick Assist for Help

Discover how to use Windows 11 Quick Assist for seamless remote support. Learn step-by-step setup, troubleshooting, and tips to help friends or family with tech issues instantly.

Troubleshooting Windows 11 Dual Monitor Lag Fixes

Troubleshooting Windows 11 Dual Monitor Lag Fixes

Struggling with dual monitor lag on Windows 11? Discover proven troubleshooting fixes to eliminate stuttering, delays, and performance issues for seamless multi-monitor setups. Step-by-step guide inside.

How to Fix Windows 11 Startup Settings Blank Error

How to Fix Windows 11 Startup Settings Blank Error

Struggling with the frustrating Windows 11 "Startup Settings" blank error? Discover proven, step-by-step fixes to restore your boot options quickly and get your PC running smoothly again. No tech expertise needed!

How to Activate Windows 11 Enterprise with KMS

How to Activate Windows 11 Enterprise with KMS

Discover how to activate Windows 11 Enterprise using KMS effortlessly. This comprehensive guide covers everything from requirements to troubleshooting, ensuring seamless activation for your business needs.

How to Fix Windows 11 Kmode Exception Not Handled

How to Fix Windows 11 Kmode Exception Not Handled

Struggling with the dreaded KMODE EXCEPTION NOT HANDLED error on Windows 11? Discover proven, step-by-step fixes to resolve this blue screen nightmare quickly and get your PC running smoothly again. No tech expertise needed!

Troubleshooting Windows 11 Motherboard Driver Error Fix

Troubleshooting Windows 11 Motherboard Driver Error Fix

Struggling with Windows 11 "Motherboard" Driver Error? Discover proven troubleshooting steps to fix it fast and get your PC running smoothly again. Easy, step-by-step guide for beginners.

How to Fix Windows 11 Ping Spikes Over Wi-Fi Fixes

How to Fix Windows 11 Ping Spikes Over Wi-Fi Fixes

Struggling with ping spikes on Windows 11 over Wi-Fi? Discover proven fixes to stabilize your connection, reduce lag, and enjoy smooth gaming or streaming. Step-by-step solutions for instant results.

How to Recover Deleted Photos in Windows 11

How to Recover Deleted Photos in Windows 11

Accidentally deleted precious photos? Discover proven methods to recover deleted photos in Windows 11 effortlessly. Step-by-step guides, tools, and tips to restore your images safely.

How to Use Windows 11 Terminal Instead of CMD

How to Use Windows 11 Terminal Instead of CMD

Discover how to use Windows 11 Terminal instead of CMD for a modern, efficient command-line interface. Learn installation, setup, and tips to boost your productivity with tabs, themes, and more.

How to Activate Windows 11 Pro Without a Product Key

How to Activate Windows 11 Pro Without a Product Key

Discover safe, legitimate ways to activate Windows 11 Pro without a product key. Learn step-by-step methods using built-in tools and official Microsoft options to get your OS up and running smoothly. No risks, no hassle – just pure productivity.