The Command Prompt is a handy way to perform specific tasks, but sometimes it doesn"t recognize what you want from it. Here"s how lớn fix that.

Bạn đang xem: Cmd


The Command Prompt in Windows is a handy utility. It allows you to lớn perform many tasks quickly; however, the command processor may show the "not recognized as an internal or external command" error when you try to lớn execute a command.

It is a common error & usually occurs due lớn incorrect command execution. This article explains the causes and a few troubleshooting steps to lớn help you fix this error.

Why the Not Recognized as an Internal or External Command Error Occurs?

Windows OS keeps a list of paths known as Windows Environment Variables lớn launch and execute programs quickly. Any issues with it can cause the error.

Potential issues that cause this error include:

Incorrect commands. Registry entries interrupting the functioning of commands & more. Executable programs or scripts not installed. An incorrectly specified path or filename. A missing file directory in Windows Environment Variables.

Related: A Beginner's Guide to lớn the Windows Command Prompt

How to lớn Fix the "Not Recognized as an Internal or External Command" Error

This error is often triggered when you run a program or CMD command, and something goes wrong. We have listed fixes for both versions of the error, so follow the relevant one khổng lồ your case.


Command Prompt can’t run a program that does not exist. If you are trying to lớn execute a newly installed program, ensure it is correctly installed.

To verify the installation:

Press Win + R to open Run. Then, type control and click OK. Then, in the Control Panel, go to Programs > Programs và Features. Scroll through the danh sách of installed apps and locate the ứng dụng you want to run.

Alternatively, you can also view installed apps by accessing Apps và Features in Settings. To bởi vì this, press Windows key + I, click on Apps and locate the installed app.

By default, when you try lớn launch a program or a script from CMD, the command processor looks for the related files and paths in the System32 thư mục or environment variables. If the file is missing, it will return the not recognized as an internal or external command, operable program, or batch tệp tin error.

This is likely because Windows does not install most apps in the System32 folder, but C:Program Files instead.

You can resolve this issue in three ways:

First, use the full path of the executable file to launch the program. Second, địa chỉ the program path to lớn Windows environment variables. Finally, move the files to the System32 folder.


First, let's try the full path method. Here, we will use the full file path instead of the tiện ích name to lớn launch programs from Command Prompt. Here's how to do it:

First, open the Command Prompt as administrator. Next, type the full path of the application you want khổng lồ 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 lượt thích this:

C:ESBCalcPort.exe That said, this will only work if the file path does not have any white spaces. If your tệp tin path has a space, type the file path inside double-quotes.


Command Prompt reads the white spaces as the kết thúc of a command and treats anything after the space as a separate command.

Xem thêm: Chỉnh Kích Thước Button Trong Html (Kèm Ảnh), Cách Để Đổi Màu Button Trong Html (Kèm Ảnh)

Let’s say you want to lớn launch the mạng internet Explorer app located in C:Program FilesInternet Exploreriexplore.exe via CMD. However, running this tệp tin path will return an error due khổng lồ the space between Program Files and mạng internet Explorer.

To avoid this, you can insert the file path within a double quote. Here, the command to lớn launch internet Explorer will look lượt thích this:

"C:Program FilesInternet Exploreriexplore.exe"

4. Add the tệp tin Path lớn the Windows Environment Variables

You can edit the Environment Variables and showroom the file path of your application to lớn its directory. This way, Command Prompt will identify the path for the entered command & execute it without the error.

Adding a full tệp tin path khổng lồ the Windows Environment Variable can help you resolve the not recognized as an internal or external command error for the Flex, nmake, make, cobra, Is, terraform, gcc, code, apk Studio, Python, Fastboot, và ADB commands.

Related: How to lớn Use the Equivalent of the "ls" Command in Windows

To edit Windows Environment Variable:

Press Win + R to mở cửa Run. Next, type control and click OK to xuất hiện the Control Panel. Go khổng lồ System & Security > System. In the left pane, click on Advanced System Settings.


On newer versions of Windows 10, 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 khổng lồ paste the program's file path you want khổng lồ run from CMD. For example, if you want khổng lồ run the Chrome browser located in C:Program FilesGoogleChromeApplication, then the full file path will look lượt thích this:C:Program FilesGoogleChromeApplication Click OK to địa chỉ cửa hàng it khổng lồ the Environment Variables. Then, click OK on all xuất hiện windows lớn save the changes.
Once you have added the new environment variable, open Command Prompt, enter the program's name, and CMD will xuất hiện it without any error.

System32 is a protected system folder, & it is protected for a good reason. When you try to lớn launch a program as an administrator, Command Prompt looks for the executable file in the System32 folder. However, since all the programs are not installed in the System32 folder, you may end up with an error.

If you still want khổng lồ run the program from CMD & don’t want lớn type a full tệp tin path, you can move the program files to lớn the System32 folder.

Xem thêm: Hướng Dẫn Cách Sử Dụng Viber Trên Điện Thoại Nhanh Nhất, Viber Messenger: Nhắn Tin Và Gọi Điện Miễn Phí

To move program files lớn the System32 folder:

Navigate to the installation directory for your program and copy all the files in the folder. Here, we will move Google Chrome files located in C:Program FilesGoogleChromeApplication to lớn the System32 folder. Next, navigate khổng lồ the C:WindowsSystem32 folder and paste the copied files. Click Yes if a UAC prompt appears. Next, open the Command Prompt as administrator, type chrome, and hit enter. CMD will instantly open the Google Chrome browser.

Fixing the CMD Not Recognized as an Internal or External Command Error

Command Prompt commands are not case-sensitive, but it does not forgive of extra spaces. Lớn resolve this error, check if the commands are correct and use file paths with spaces within double-quotes. For the programs not installed in the System32 folder, địa chỉ cửa hàng an environment variable with your application’s full tệp tin path to launch apps through CMD.