This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: Unix pathname -> DOS pathname
- To: <roger at isp dot uni-kassel dot de>
- Subject: RE: Unix pathname -> DOS pathname
- From: Tony Pires <t_pires at fox dot nstn dot ca>
- Date: Wed, 23 Sep 1998 19:20:08 -0700
- Cc: <gnu-win32 at cygnus dot com>
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@cygnus.com" with one line of text: "help".
>
>
>
>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".