I need to convert paths in 8.3 convention to full path.
In Perl, I can use Win32::GetLongPathName()
as pointed out in How do I get full Win32 path from 8.3 DOS path with Perl? But, I need to do it in Python.
Use ctypes
which is available in the Python standard without the need of using the pywin32 API. Like this:
from ctypes import *
buf = create_unicode_buffer(260)
GetLongPathName = windll.kernel32.GetLongPathNameW
rv = GetLongPathName(path, buf, 260)
print buf.value
From http://mail.python.org/pipermail/python-win32/2008-January/006642.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With