Here's what I have so far.. but it doesn't work.
EDIT: found this code by leadwerks (for b+)
I am fairly certain there is a way in max to do it without using a bank, it just hasn't come to me yet :/
DebugLog GetFullPath(getenv_("temp")) Function GetFullPath:String(shortpath:String) Local lngpath:Byte Ptr, size:Int = Len(shortpath) GetLongPathNameW(shortpath, lngpath, 1024) Return String.fromcstring(lngpath) End Function Extern "win32" Function GetLongPathNameW(lpzshortpath:String, lpzlongpath:Byte Ptr, cchbuff:Int) = "GetLongPathNameW@12" End Extern
EDIT: found this code by leadwerks (for b+)
Function NiceFileName$(file$) size = Len(file) + 100 temp = CreateBank(size) GetShortPathName(file$, temp, size) file$ = PeekString(temp, 0) GetLongPathName(file$, temp, size) s$ = PeekString(temp, 0) FreeBank temp Return s End Function
I am fairly certain there is a way in max to do it without using a bank, it just hasn't come to me yet :/