Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Long filename instead of 8.3 dos equivalent

Status
Not open for further replies.

ricalpmar

Technical User
Aug 23, 2002
3
GB
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 DOS:put 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top