You may have to call out to the Windows command interpreter, possibly
writing output to a file, to do the translation.
Al
···
-----Original Message-----
From: Guillaume Marcais [mailto:guslist@free.fr]
Sent: Friday, April 02, 2004 4:23 PM
To: ruby-talk ML
Subject: ruby, cygwin and paths
This is almost not a ruby question… But I need a ruby solution!
How to convert a 8.3 dos paths to its fully expanded version. For
example, how to translate:
C:\CYGWIN\HOME\MYFULL~1\MONROE~9.ALT
to
/cygdrive/c/cygwin/home/My Full Name/Monroe-Tyson.alt
The basename of this last path is relevant to me and while MONROE~9 is
unusable. cygpath -u, from the cygwin distribution, doesn’t expand the
8.3 names. It merely changes the \ into /. How fancy!
Any solution out there?
Guillaume.