Script to map folder names to another directory, then rename the source
Posted on 2014-02-06
I'm looking for help with some scripting that would accomplish the following.
Directory A has a series of folders.
Directory B has a series of folders, perhaps more, than DirA.
I would need to be able to pair a folder in DirA with a folder in DirB, and map the results to a .csv which would then rename the folders in DirB to match it's pair in DirA. Also at this time, any unpaired folder would be moved to a specified location, marked as 'unsorted'. As you might imagine, I have a large number of folders to merge and would need the names to match to accomplish this.
The primary challenge I am having is the pairing of folders. I'm not well versed enough to know a clean way to go about this but I think the easiest method would be for each folder in DirA, it would ask for the matching folder name in DirB (which could be typed and finished with the Tab key); but perhaps a script guru might have a better idea.
Appreciate the advice in advance.