Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADIR issues - short vs longname
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01343768
Message ID:
01343852
Views:
13
You can use GetShortPathName

Re: SET PATH and embedded commas Thread #929476 Message #929638

>I have a small application that converts word documents to htm files. They are placed on a win 2000 server that has win 3.11 machines connected to it. Therefore to make sure that I can read all of the htm files, I use the short name of the file as the link, copying the longname to the shortname and then link it.
>
>It seems that the short names do not link to the long names properly...
>
>Code below
>
>	nDocs=ADIR(longnames,"*.doc","",1)
>	=ADIR(shortnames,"*.doc","",2)
>	DIMENSION ProdLinks[ALEN(shortnames,1),2]
>	FOR y=1 TO ALEN(ShortNames,1)
>		ProdLinks[y,1]=JUSTSTEM(ShortNames[y,1])
>		ProdLinks[y,2]=JUSTSTEM(LongNames[y,1])
>	ENDFOR
>
>The issue is that the shortnames do not match... the ones got via dir -x
>sample dir listing
<snip>>
>For example if you examine line 5, you may note the file name is 1-1100~4, yet in my VFP app it is 1-065D~1. Notice there is NO file with this as its short name in the list! Needless to say my links do not work.
>
>Any ideas what is going on here?
>
>Or is there a better way to get the short file name?
>
>TIA,
>Mike
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform