How to fix '.' is not an internal or external command error

CmdEnvironment Variables

Cmd Problem Overview


I have followed few links to try and solve this issue, such as link1 , where they have asked to me include the path of the exe in the environment variables. This is the following command I tried, to get this error

       D:\Gesture Recognition\Gesture Recognition\Debug>./"Gesture Recognition.exe" 
       rawrec1.trr

and the error

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

I included the gesture recognition exe path into the systems and user variables of the environment variables. Even after booting the system, the error still persisted. Can anybody help me to solve this or fix this? Thanks in advance

Cmd Solutions


Solution 1 - Cmd

Just leave out the "dot-slash" ./:

D:\Gesture Recognition\Gesture Recognition\Debug>"Gesture Recognition.exe"

Though, if you wanted to, you could use .\ and it would work.

D:\Gesture Recognition\Gesture Recognition\Debug>.\"Gesture Recognition.exe"

Solution 2 - Cmd

Replacing forward(/) slash with backward(\) slash will do the job. The folder separator in Windows is \ not /

Solution 3 - Cmd

I got exactly the same error in Windows 8 while trying to export decision tree digraph using tree.export_graphviz! Then I installed GraphViz from this link. And then I followed the below steps which resolved my issue:

  • Right click on My PC >> click on "Change Settings" under "Computer name, domain, and workgroup settings"
  • It will open the System Properties window; Goto 'Advanced' tab >> click on 'Environment Variables' >> Under "System Variables" >> select 'Path' and click on 'Edit' >> In 'Variable Value' field, put a semicolon (;) at the end of existing value and then include the path of its installation folder (e.g. ;C:\Program Files (x86)\Graphviz2.38\bin) >> Click on 'Ok' >> 'Ok' >> 'Ok'
  • Restart your PC as environment variables are changed

Solution 4 - Cmd

This error comes when using the following command in Windows. You can simply run the following command by removing the dot '.' and the slash '/'.

Instead of writing:

D:\Gesture Recognition\Gesture Recognition\Debug>./"Gesture Recognition.exe"

Write:

D:\Gesture Recognition\Gesture Recognition\Debug>"Gesture Recognition.exe"

Solution 5 - Cmd

I also encountered this issue when working with Webpack. If packages are installed with NPM, ideally you should not have to provide a path to the module that you intend to run. Something like this should work:

"build": "webpack --config webpack.config.js",
"start": "webpack serve --config webpack.config.js --open"

From my testing, this works in Git Bash, Powershell, and the Command Prompt.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLakshmi NarayananView Question on Stackoverflow
Solution 1 - CmdChris LeyvaView Answer on Stackoverflow
Solution 2 - CmdDila GurungView Answer on Stackoverflow
Solution 3 - CmdPrasanna KumarView Answer on Stackoverflow
Solution 4 - Cmdanuj jhambView Answer on Stackoverflow
Solution 5 - CmdSam RothsteinView Answer on Stackoverflow