Link to home
Start Free TrialLog in
Avatar of sdruss
sdruss

asked on

Perl Script - Map Individual File to a Specific Directory

Would like to add this to my existing PERL script.  Project created mapping between a Manufacturing release version and a Business release version numbers.  Based on the Manufacturing release database schema file .e.g. db_AB_17.43.03, I want to map this back to the business version.  So, given the file “db_AB_17.43.03” I want to get the Business version.  All of this is laid out in a directory hierarchy like the following.

Window Directory hierarchy structure:

CM  
        Bus-Version  --  
                Manurf-Version    
                                           DB         db_AB_17.43.03
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Are you only given the filename or the entire filepath for the db file?  If only the filename, how do you know what directory it is in or where to find the file?
Avatar of sdruss
sdruss

ASKER

Just the filename.  Typically I traverse the directory structure looking for the file.
How do you currently traverse the directory structure looking for the file?  Or is that part of what you need to add?
ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sdruss

ASKER

Thanks I will check it out.  May take a week.  Mucho appreciated!
Avatar of sdruss

ASKER

Forget to mention I will be running this script in a Unix/Solaris platform, and the directory/file is mount on Windows.  We use samba.  How does this make a difference with the code snippet?
Just to be sure I understand.  The script will run on Solaris.  The file system is Windows (but it is mounted on Solaris via samba).  Is that correct?

In any case, it should not affect the script at all.  You just need to point the script at the right location in the filesystem ('/path/to/CM' in the script).
Avatar of sdruss

ASKER

Yes, that is correct.  I will give it shot next week.