Link to home
Start Free TrialLog in
Avatar of Ricky Ray
Ricky Ray

asked on

Batch Relocate Folders Based on Portion of Folder Name

I have thousands of folders that I need to relocate to other folders based on a portion of the folder name. The folders look like this:

M:\Blah Blah\Blahty\Blah Blah\Projects Dept # Added\GG001128 - 4137
M:\Blah Blah\Blahty\Blah Blah\Projects Dept # Added\GG004057 - 4137
M:\Blah Blah\Blahty\Blah Blah\Projects Dept # Added\GG001242 - 7567
M:\Blah Blah\Blahty\Blah Blah\Projects Dept # Added\GG001732 - 4166X
M:\Blah Blah\Blahty\Blah Blah\Projects Dept # Added\GG001944 - 7005X
M:\Blah Blah\Blahty\Blah Blah\Projects Dept # Added\GG001946 - 7005X

Based on the last 4 or 5 characters of the folder name (if 5, will contain a trailing X), I need to relocate the folders to:

M:\Blah Blah\Blahty\Blah Blah\CUMC\4137 - NBD Nobody Has A Clue
M:\Blah Blah\Blahty\Blah Blah\CUMC\4166X - DER Dooby Doo
M:\Blah Blah\Blahty\Blah Blah\CUMC\7567 - AAC Animal Care
M:\Blah Blah\Blahty\Blah Blah\CUMC\7005X - ARK Noah

Spent a couple hours googling to no joy, and have a deadline at work I have to meet, so I'll greatly appreciate any help provided.
SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada 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
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
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 Ricky Ray
Ricky Ray

ASKER

Thank you both, extremely helpful, mucho appreciated!
You're welcome. Glad to help.
Ricky... Don't forget to close the question and award points.