import Directory Folder list

snadyau

New member
Local time
Tomorrow, 07:47
Joined
Nov 27, 2007
Messages
3
I want to create a VBA script that will allow me to nominate a Directory Tree and import to a table all the names of the folders in that tree. I thought application.filesearch might do it but I can only see how to work with filenames - not folder names. I am not interested in file names (though how many files in each folder may be useful) Any suggestions?

Also I find it confusing as to the correct way to use .filesearch and would appreciate a pointer to where I can find the right help (VBA help is a bit brief on this issue)

TIA
 
There is code example in msdn.com. If shows you how to check whether a file or folder exist, list files in a particular folder etc.

Go to msdn.com then "VBA Dir()"
 
Thanks - but still neeed help

Thanks for your response - but I think I got side tracked into something else. searching the web site msdn.com for "VBA Dir()" produced the following

Dir()
Returns or sets a String that represents the reading order of text in an HTML element.

expression.dir
expression Required. An expression that returns one of the objects in the Applies To list.


For me this does not relate to the question. Or am I missing something

TIA
Sandy
 
Thanks - I didn't think of using those commands directly. how daft of me. A few loops and I think it can be done.

Again - thanks
Sandy
 

Users who are viewing this thread

Back
Top Bottom