in reply to Short directory names...
That is probably the safest method if all versions of windows use the same function name for it, I've only got Win98 to test it on so I'm not sure what the NTs do.use Win32::API; my $GetShortPath = new Win32::API ( "kernel32", "GetShortPathName", [' +P','P','N'], 'N' ); my $len = 100; my $short = (' ' x $len); my $long = 'c:\\program files\\microsoft office\\'; my $size = $GetShortPath->Call($long, $short, $len); print substr($short,0,$size) . "\n";
Update: Okay so it is avalible in one module. I thought it might be, it just didn't jump out at me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
($code or die): Re: Re: Short directory names...
by $code or die (Deacon) on Jan 20, 2001 at 21:25 UTC | |
|
Re: Re: Short directory names...
by rrwo (Friar) on Jan 21, 2001 at 01:24 UTC | |
|
Re: Re: Short directory names...
by $code or die (Deacon) on Jan 21, 2001 at 22:27 UTC | |
by tye (Sage) on Jan 21, 2001 at 22:46 UTC |