Path name conversions, Posix <-> Win32

Mark Hadfield
Mon Jan 12 20:11:00 GMT 1998

Where can I find command-line utilities for conversion between Cygwin32
Posix-style and Win32 path names? Eg, a pair of utilities that work like

bash$ echo //C/foo | win32path
bash$ echo C:\\foo | posixpath

I know it's not too difficult to implement this via string substitution in
awk or bash. (The above examples are real output, produced by a pair of
Python scripts that I wrote.) What I really want is something that knows
about Cygwin32 mounts, eg:

bash$ mount D: /cdrom
bash$ echo D:\\foo | posixpath
bash$ echo /cdrom/foo | win32path

Obviously this functionality is built into Cygwin32, but I don't know of any
simple way to access it at the command line.

Mark Hadfield,
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand

For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

More information about the Cygwin mailing list