Sign in to follow this  
Followers 0
Chris_1013

Lookup list

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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. :D


Triton

Share this post


Link to post
Share on other sites

I was being dense, as usual.. I've cheated, I just spit the file out as an INI file now. Makes lookups much easier :-)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0