PDA

View Full Version : search folder structure and return paths only



STEELWHEELS
03-04-2013, 02:06 PM
Hello All

I am new on here and this is my first post.

I have been working on a project to help manage our cad system, basically the software has to use a file called search.pro, a txt file that list all the file paths, you have to list every single folder path, can't just list the top directories ( ah....just like the old days of DOS ).

the project is designed to search the parent directory and list all folder and sub folders below, then update a txt list and then overide the search.pro file in each folder, ( 10 files in 10 different start up directories, based on what cad job we are doing )

I have a basic VBA level of knowlegde an I have it up and running, now I need to refine it and make it an automatic process.

The first step is to find a better way of searching for folder structure.

I have searched this forum and experimented with a number of scripts to search for files and return their location, but this creates multiple records of the same path.

I need a method of just searching for the folder sturcture only, not any files, and return a single instance of that folder path, no matter where I have looked, I can't find any means to search for folders only.

Any assistance would be appreciated.

Thank you

Peter

Kenneth Hobs
03-04-2013, 02:10 PM
Welcome to the forum!

Most DOS methods still work. See: http://www.vbaexpress.com/forum/showthread.php?t=45280

STEELWHEELS
03-04-2013, 05:32 PM
Thank you Ken

The link has exactly what I needed, I already have ben able to adapt it to suit what I need

Peter