New
#1
Dos paths and unix paths conversion
I guess this may be a tiny bit off the subject here, but I am attempting this in windows 7.
I have a program file manager tool called 'Directory Opus' that is capable of calling windows external programs and passing them the current directory the file manager is sitting on.
So far so good.
Now I want to call a cygwin (linux/unix emulator for windows) terminal with that file manager.
Checking properties on the cygwin Icon I got the path: C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
So it is a path to a command and an argument to that command.
Actually I guess it is 2 arguments to a command since I think '-' in that position means to feed anything on STDIN to the command. At least that would be true in unix shell programming.
So using the Directory opus setup I pass this call:
'@async:C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico - <and here add {s}>'
So the call ends up:
'@async:C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico - {s}'
That call does just what it is supposed to. It passed the current file absolute address however cygwin terminal does not understand the windows path notation. If I were passing it: C:\subdir\blah\ It would just say 'No such file' Cygwin terminal wants to see /cygdrive/c/subdir/blah Or at least I think that is what is happing.
So to cut to the chase.... I'd like to put a little wrapper to Cygwin terminal in there with the code necessary to convert 'C:\subdir\blah\' to '/cygdrive/c/subdir/blah/'
But, I do not know how to code up such a *.bat file. To do it in linux shell languages would be (for me) something I could do but it would take some trial and error. But when it comes to dos shell language... I don't know poop.
Can I get any takers on coaching me thru the required coding.... Yes, I know, it could be a bit time consuming considering I am known to be a bit thick skulled at times. But..., so, any takers?