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

喜欢而已 提交于 2019-12-22 12:44:09

问题


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!


回答1:


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




回答2:


Win32::GetLongPathName() is all you need.



来源:https://stackoverflow.com/questions/770171/how-do-i-get-full-win32-path-from-8-3-dos-path-with-perl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!