Windows exe, bat, cmd not launching under cygwin /MobaXterm unless extension explicitly provided

1

I am using a preconfigured cygwin that is packaged into the MobaXterm product. Following is an example of the issue I am facing:

$ sbt package
/usr/bin/bash: /drives/c/apps/sbt/bin/sbt: No such file or directory

The actual command that should have been invoked is:

/drives/c/apps/sbt/bin/sbt

So what I need here is some environment variable that tells cygwin a set of potential extensions to file names:

Something along the lines of:

export EXE_EXTENSIONS=CMD,cmd,EXE,exe,BAT,bat

javadba

Posted 2014-06-24T02:23:02.000

Reputation: 2 201

Answers

0

you can run the following command

cmd /c <executable>

For example, I wanted to run the mysql (mysql.exe) present inside the C:\installedSoft\xampp\mysql\bin directory. It works when tested in MobaXterm and it works fine as expected. Ensure the executable is in your PATH environment variable.

which will run the windows native executable files on the Cygwin like shell utilities.

itsraghz

Posted 2014-06-24T02:23:02.000

Reputation: 101

1The question mentioned not including the extension. – javadba – 2019-09-01T20:12:45.640

Thanksk @javadba. I have edited the answer. In fact this trick works for the executable without the extension as well. – itsraghz – 2019-12-10T06:56:06.007