Search for a folder and return full path.
I know the folder name that I am looking for and I know the parent directory name. The folder I am looking for is several sub folders deep in an array of sub folders beneath the parent directory. With VBA code I would like to be able to enter the parent directory, enter the sub directory name and recieve the resultant full path to that folder location.
Thanks in advance for your help.
Close - on the right track
I have a folder under the J: drive called "jobs". Within the "jobs" directory are all the folders to projects in numerical order by job number. The are ordered numerically in groups first in folders by 1000 jobs and then in subfolders by 100 jobs. So the tree to job number "012021" is:
J:\Jobs\12000-12999\12000-12099\012021
I know that all jobs are uner the J:\Jobs and I know the folder title "012021". I am struggling with how to navigate to that specific folder within the tree. I need to access a specific file in the job folder within the code.
Thanks again for your help.
You stated it better than I did.
"2- you know the part of the full path to file which is "J:\Jobs\.....-.....\.....-.....\012021" and look for a way that returns values for dots.
to do so, you need a rule. "
It did produce the path for the example I gave you. Which is perfect. I think you are the exact right path. The next job number, "010777" should return a path of "J:\Jobs\10000-10999\10700-10799\010777" but returned
"J:\Jobs\10000-10999\10000-10099\010777"
I will play with your code and see if I can't get to this result. Thanks so much for your help.
Jeff