Mail Archives: cygwin/1998/09/24/08:50:14
You will need to write some code to get the mount points from the registry
in order to perform the magic. Can you code?
There was a post sometime ago on this list that offered a DOS path to Posix
path conversion, but this is not what you want. Search the archives for
"posixpath" or "Command here" if this interests you.
Alternately, get yourself a copy of "pwd" from the Mingw32 shell utils
ported by Earnie Boyd. This stuff can be found at ftp.franken.de in
pub/win32/develop/gnuwin32/mingw32/porters/Boyd_Earnie
Good Luck.
At 06:18 PM 9/21/98 +0200, you wrote:
>
>Hi,
>> > How can I convert a Unix pathname to a DOS pathname? Example:
>> >
>> > from: /usr/local/myfile
>> >
>> > to: D:\local\myfile
>> >
>> > (in the example /usr is mounted on D:)
>>
>> Hey, you just did! (Sorry, couldn't resist.)
>Actually it is more interessant, how to do it in shell scripts.
>One possibility is to launch
>echo `cmd.exe /c cd`
>to get the cwd in DOS/NT syntax, but the performance could be
>better.
>Does anybody know a better solution?
>
>Roger
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
>
>
>
>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -