Jump to content

Lookup list


Recommended Posts

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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...