Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare directory name with itself... 8.3
Message
From
20/03/2018 08:38:47
 
 
To
20/03/2018 08:36:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01658846
Message ID:
01658849
Views:
38
>>>I have a funny problem. I need to copy a file to %temp% folder and I should check whether the source file is actually that same file. I'll check that some other way, probably using LLFF, but while trying to just compare folder names I ran into a problem. The sourcefile's name is retrieved from the file dialog ocx (of msComCtl), and its name looks like c:\users\dnedeljkovich\AppData\Local\temp\something.ext, however my app.tempPath is set from getenv("temp") or sys(2023) which both give c:\users\DNEDEL~1\AppData\Local\temp\something.ext - which is the same path, just that the latter is in dreaded old 8.3 (and yes, issuing set in cmd.exe shows that TEMP environment variable is exactly what getenv() shows).
>>>
>>>I sort of remember we had (20 years ago) some function which would convert LFNs into 8.3 for comparison. What was it? Anyone with memory better than mine?
>>
>>This ? https://msdn.microsoft.com/en-us/library/windows/desktop/aa364989(v=vs.85).aspx
>
>Yup, that's it (though it refuses the 3rd parameter). Actually, found it at https://github.com/VFPX/Win32API/blob/master/libraries/kernel32/GetShortPathName.md after looking at the links Doug posted, in Anatoliy's library.
>
>BTW, UT thinks we're on daylight time savings already, because US(-AZ, -HI) and Canada are.

3rd parameter should not be a problem
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform