Mail Archives: cygwin/2000/04/26/10:40:47
Earnie,
Well, I've finally understood why it does not work on Windows 2000. On 2000, the cmd.exe is more restrictive that in NT: it does not accept path with forward slashes '/' as it does in NT 4.0
The workaround I use for interactive use it to define the following alias:
start_file () {
cmd /c `cygpath -w $1`
}
alias start=start_file
Then I would type in my bash shell:
> start ./test1/test2/run.bat
Note that it also works for other type of files such as MS words files (it launches MS-Word), PDF, HTML, and all the files whose extension have been mapped to an application on the NT workstation.
For our bash scripts, we'll specifically invoke cmd /c `cygpath -w ./test1/test2/run.bat`
I hope this can help other cygwin users.
Regards,
Guillaume.
>
> WOW!! I just tried starting bash for MSDOS CMD.EXE using
> forward slashes in
> the path and it worked!! :0 Too bad I can't cd to the
> directory using forward
> slashes.
>
> Chris, the problem isn't that foo.bat won't execute under
> Cygwin bash, it will.
> The problem is that it won't execute with relative paths.
> Absolute paths work
> great. I was able to emulate Guillaume's problem with his example.
>
> Example:
>
> ---foo.bat---
> REM This will execute under the MSDOS shell.
> PAUSE
> REM End of foo.bat
> ---end foo.bat---
>
> /path/to/foo.bat; #works
> path/to/foo.bat; #doesn't work
> ./path/to/foo.bat; #works
>
> Cheers,
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -