Get the correct filepath

BlitzPlus Forums/BlitzPlus Programming/Get the correct filepath

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

You have to convert to a short filename and back.

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

Notify NiceFileName$("C:\WINDOWS\EXPLORER.EXE")