Frew Schmidt
Frew Schmidt

Reputation: 9544

How do I get full Win32 path from 8.3 DOS path with Perl?

My question basically says it all. I am getting this:

C:\DOCUME~1\frew\MYDOCU~1\Code\AIRCRA~1\lib\ACD\VALIDA~1.PM

and I want this:

C:\Documents and Settings\frew\My Documents\Code\aircraft_ducting\lib\ACD\Validators.pm

I looked at File::Spec::Win32 but that didn't seem to have anything that would do the trick.

Ideas?

Thanks!

Upvotes: 2

Views: 1121

Answers (2)

Eugene Talagrand
Eugene Talagrand

Reputation: 2234

You can use Win32::GetLongPathName($path) from the Win32 module.

Upvotes: 12

snowcrash09
snowcrash09

Reputation: 4814

Win32::GetLongPathName() is all you need.

Upvotes: 7

Related Questions