Mail Archives: djgpp/1998/02/25/11:00:23
On Tue, 24 Feb 1998, Pete Nelson wrote:
> Works well from the command line. Now how do I redirect it to grab the
> 32bit filename on a 'drag-n-drop'?
I assume you run this utility from Windows 95, and that you have set
LFN=y in the environment or in your DJGPP.ENV files.
If the above is true, then call the library function `_truename' on the
short 8+3 alias, and it will return the long name. If you want the long
name to be formatted with Unix-style forward slashes, call `_fixpath' on
what `_truename' returns.
One caveat: `_truename' can return a UNC (like "\\FOO\SYS\DIR\FILE")
instead of the usual DOS "D:\DIR\FILE" when the file is on a remote
drive, even if the short alias was in the DOS "D:\FOO" form. There is a
way to work around this (if you at all care), but it is tricky.
- Raw text -