I need to browse my hardrive for a excel file which is run inconjunction with my script ,I want to display in a dialogbox the long filename instead of the short 8.3 hashed equivalent filename, is it possible?
I have not been able to do this with procomm. I can only display and recognize the dos equivilant.
You might want to check the help files. To go where no programmer has gone before.
If I recall correctly, you will get filenames in 8.3 format on Win95 and Win98, while NT and 2000 (and XP I suppose) would display long filenames. aspect@aspectscripting.com
Similar problems exist in other legacy languages (ie dos based dBase or Clipper). One way around this is to use a feature of the DOS dir command .. "dir /x"
What i've been able to dois" "dir /x >mydir" This pipes the output to a file and shows the long and short names of the files.
Interesting feature (?) is that the listing only shows "long" and "short" names if the filename is greater than 8.3 If it is 8.3 then you'll see one field. Basically, you 'll need to load this up into arrays and keep track of the 8.3 as well as the long.. then present the user with a selection box..
I used two arrays. One with the short, one with the long. If the short name was blank then i used the long for both.
sample output from DOSut this into COURIER and the col's line up:::
01/24/2003 07:26a 5 xxxxxxxx.xxx
01/24/2003 07:25a 5 XXXXXX~1.XXX xxxxxxxxx.xxx
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.