Win32: shortpathname to longpathname

J

Jim Tittsler

I wrap my cross platform application up with py2exe on Windows, and
have the installer associate a particular file type with it. When a
user double clicks on a document to launch my application, Windows
appears to pass me the "short" Windows pathname. How can I convert to
the long version of the pathname? (Ideally using the standard library
rather than win32all AKA pywin32.)
 
G

Gabriel Genellina

I wrap my cross platform application up with py2exe on Windows, and
have the installer associate a particular file type with it. When a
user double clicks on a document to launch my application, Windows
appears to pass me the "short" Windows pathname. How can I convert to
the long version of the pathname? (Ideally using the standard library
rather than win32all AKA pywin32.)

You want GetLongPathName:
http://msdn2.microsoft.com/en-us/library/aa364980.aspx
It's not directly available on the standard library; you can either use
win32api.GetLongPathName or call it using ctypes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top