-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLong2Short.BAK
More file actions
35 lines (31 loc) · 1.09 KB
/
Long2Short.BAK
File metadata and controls
35 lines (31 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
* Program Name : Long2Short.Prg
* Article No. : [Win API] - 019
* Illustrate : ?????/???????/???
* Date / Time : 2001.09.10
* Writer :
* 1st Post :
* My Comment : FoxPro ?????/?????? 8/3 ??????/???,
* : ?? GetShortPathName API ??,?????......
* Usage : ? ShortPath("C:\Program Files\Microsoft Visual
* : Studio\Vfp98")
************************************************************************
Function ShortPath
******************
*** Function: Converts a Long Windows filename into a short
*** 8.3 compliant path/filename
*** Pass: lcPath - Path to check
*** Return: lcShortFileName
*************************************************************************
Lparameter lcPath
Declare INTEGER GetShortPathName IN "kernel32";
STRING @ lpszLongPath,;
STRING @ lpszShortPath,;
INTEGER cchBuffer
lcPath = lcPath
lcShortName = SPACE(260)
lnLength = LEN(lcShortName)
lnResult = GetShortPathName(@lcPath, @lcShortName, lnLength)
If lnResult = 0
Return ""
Endif
Return LEFT(lcShortName,lnResult)