Chris_1013 Posted June 21, 2004 Share Posted June 21, 2004 I need to match up short file names of files to their long file name equivalents. I cannot use FileGetShortName as these files reside on a NetWare share and I've learnt from experience how NetWare won't work nicely with the Windows APIs and as such doesn't work. So, here's what I proposed to do. Generate a text file (useing dos DIR command), listing short file names and their long file name equivalent. Read into a variable the path I need the long file equivalent for. Somehow look this up in my DIR generated text file. This last point is the bit I'm having trouble with. Can anyone suggest a way to do this? Cheers Chris Link to comment Share on other sites More sharing options...
Triton Posted June 21, 2004 Share Posted June 21, 2004 How about something like: 1. search for the first 6 chars of the variable from the text list of short names 2. when equal then check to see if the short name actually is the right one based on the last char of the short name 3. pipe a dir of that file name with the short equiv to a temp text file to varify it is the proper short equiv. If not continue comparing untill it is found. something like that. Triton Link to comment Share on other sites More sharing options...
Chris_1013 Posted June 21, 2004 Author Share Posted June 21, 2004 I was being dense, as usual.. I've cheated, I just spit the file out as an INI file now. Makes lookups much easier :-) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now