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:
01343883
Views:
13
And this message Re: ADIR, SYS(2000) and Filer all returned wrong results Thread #1173982 Message #1174229 should explain and help you out.

>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
>
>30/08/2008  18:28             7,498 1_1500~1.HTM 1_1500 KEVLAR.htm
>30/08/2008  18:23             7,543 1-1100~1.HTM 1-1100 B PE 2211112.htm
>30/08/2008  18:23             6,701 1-1100~2.HTM 1-1100 B PE 2211112A0.htm
>30/08/2008  18:23             7,684 1-1100~3.HTM 1-1100 BLK PE 2211114.htm
>30/08/2008  18:23             6,681 1-1100~4.HTM 1-1100 BLK PE 2211114A0.htm
>30/08/2008  18:23             7,443 1-D8AC~1.HTM 1-1100 BRN PE 2211118.htm
>30/08/2008  18:23             6,938 1-1F1E~1.HTM 1-1100 BRN PE 2211118A0.htm
>30/08/2008  18:23             7,406 1-0DAA~1.HTM 1-1100 G PE 2211113.htm
>30/08/2008  18:23             6,780 1-2121~1.HTM 1-1100 G PE 2211113A0.htm
>30/08/2008  18:23             7,090 1-0D3D~1.HTM 1-1100 O PE 2211117.htm
>30/08/2008  18:23             6,671 1-2966~1.HTM 1-1100 O PE 2211117A0.htm
>30/08/2008  18:23             8,029 1-A70A~1.HTM 1-1100 PE 2111110.htm
>30/08/2008  18:23             7,041 1-8ECC~1.HTM 1-1100 PE 2111110A0.htm
>30/08/2008  18:23             7,456 1-E7B8~1.HTM 1-1100 PE HT 2111310.htm
>30/08/2008  18:23             7,628 1-051D~1.HTM 1-1100 R PE 2211111.htm
>30/08/2008  18:23             7,341 1-2556~1.HTM 1-1100 R PE 2211111A0.htm
>30/08/2008  18:23             7,418 1-0997~1.HTM 1-1100 Y PE 2211116.htm
>30/08/2008  18:23             6,680 1-379B~1.HTM 1-1100 Y PE 2211116A0.htm
>30/08/2008  18:23             7,379 1-1350~1.HTM 1-1350 R PE 2231111.AO.htm
>30/08/2008  18:23             7,970 1-1440~1.HTM 1-1440 PE 2131110.htm
>30/08/2008  18:23             6,485 1-1440~2.HTM 1-1440 PE 2131110A0.htm
>30/08/2008  18:23             6,455 1-1440~3.HTM 1-1440 PE 2131F10A0.htm
>30/08/2008  18:23             7,158 1-1440~4.HTM 1-1440 PE 2531410.htm
>30/08/2008  18:23             7,595 1-FDC7~1.HTM 1-1440-4 PE 2134410.htm
>30/08/2008  18:23             7,370 1-FD78~1.HTM 1-1440-5 PE 2135410.htm
>30/08/2008  18:23             6,896 1-1670~1.HTM 1-1670 KEV 2411116.htm
>30/08/2008  18:23             6,910 1-940N~1.HTM 1-940 NY 2371320.htm
>30/08/2008  18:30             8,088 2-1100~1.HTM 2-1100 PE 2112110.htm
>30/08/2008  18:33             7,074 2-1100~2.HTM 2-1100 PE 2112110A0.htm
>30/08/2008  18:33             6,983 2-1100~3.HTM 2-1100 R PE 2212111A0.htm
>30/08/2008  18:33             7,957 2-1440~1.HTM 2-1440 PE 2132110.htm
>30/08/2008  18:33             7,318 2-1440~2.HTM 2-1440 PE 2532110.htm
>30/08/2008  18:33             8,006 2-1440~3.HTM 2-1440 PE LT 213201F.htm
>30/08/2008  18:33             7,444 2-1670~1.HTM 2-1670 KEV 2492116.htm
>30/08/2008  18:33             7,913 3-1100~1.HTM 3-1100 PE 2113310.htm
>30/08/2008  18:33             7,112 3-1100~2.HTM 3-1100 PE 2513310.htm
>30/08/2008  18:33             7,952 3-1440~1.HTM 3-1440 PE 2133310.htm
>
>
>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
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform