1
This command works in the Cygwin console:
me@WDX5CG625Q ~
$ cd "/cygdrive/c/Program Files/apache Software Foundation/Tomcat 8.5"
mw@WDX5CG62Q /cygdrive/c/Program Files/apache Software Foundation/Tomcat 8.5
$
But not in a .bat file:
tom.bat:
cd "/cygdrive/c/Program Files/Apache Software Foundation/Tomcat 8.5"
output:
me@WDX5CG625Q ~
$ ./tom.bat
C:\cygwin64\home\me>cd "/cygdrive/c/Program Files/Apache Software Foundation/Tomcat 8.5"
The system cannot find the path specified.
me@WDX5CG625Q ~
$
Also tried:
- With a
#!/bin/bash
- Without quotes
- Without quotes and spaces escaped
- With quotes and spaces escaped
Always get the “cannot find” message.
1The working version has "apache" with a small "a"; the failing version has a capital "A". Unix file names are case-sensitive. – AFH – 2018-06-14T16:29:35.710