Would it be easy to return the actual filename?
David
DECLARE FUNCTION GetLongPathName LIB "kernel32.dll" ALIAS "GetLongPathNameA" _
(lpszShortPath AS ASCIIZ, lpszLongPath AS ASCIIZ, BYVAL cchBuffer AS DWORD) _
AS DWORD
Maybe something like this:
Local zFilename As ASCIIZ * %MAX_PATH
Local zBuffer As ASCIIZ * %MAX_PATH
' Set the zFilename to the "short" file name
zFilename = .........
' Convert to long filename
GetLongPathName zFilename, zBuffer, %MAX_PATH
' The variable "zBuffer" should now hold the long filename
I was wondering how I didn't notice this before and I have found something interesting. It only happens when compiled and executed from Firefly. It works fine when executed external from FF. I actually think it is more likely an interaction between the PB compiler and FF?
So, it is a non problem as far as I am concerned. Thanks for looking into it Paul. Sorry I wasted your time.
David
If I remember correctly, I converted the filenames during the compile process to short in order to deal with PB 6 (or 7?) and also to deal with the SHELL command/function? That was a long time ago so there must have been a good reason to do so at the time. My memory is not like it used to be! :D