Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
quick list of directories..
I'm looking for a quick way to get a list of directories.
I first tried this type of scheme from the Scripting.FileSystemObject 's Set f = fs.getfolder(stDir) Set fc = f.SubFolders but that seems to run really slowly for any directory with a couple of hundred subfolders. I also tried the Dir function with the vbDirectory set as the attribute. That gets the directories, but it gets them along with the files (ahah! I think that will work for specifically what I'm doing now, now that I think about it again). But I'd still like to know a faster way to get only the subfolder names, if someone knows one. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
quick list of directories..
Afaik Dir is as fast as it gets in Windows. See
http://www.dicks-blog.com/archives/2...attr-function/ for code. HTH. Best wishes Harald "mark" skrev i melding ... I'm looking for a quick way to get a list of directories. I first tried this type of scheme from the Scripting.FileSystemObject 's Set f = fs.getfolder(stDir) Set fc = f.SubFolders but that seems to run really slowly for any directory with a couple of hundred subfolders. I also tried the Dir function with the vbDirectory set as the attribute. That gets the directories, but it gets them along with the files (ahah! I think that will work for specifically what I'm doing now, now that I think about it again). But I'd still like to know a faster way to get only the subfolder names, if someone knows one. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
quick list of directories..
Thanks, Harald.
I think "If GetAttr(sPath & sDirName) = vbDirectory " will do exactly what I need, at a good speed. The f.Subfolders property I mentioned first was unusably slow. Thanks for your help. Mark "Harald Staff" wrote: Afaik Dir is as fast as it gets in Windows. See http://www.dicks-blog.com/archives/2...attr-function/ for code. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create list from directories | Excel Discussion (Misc queries) | |||
File Open doesn't display all directories (List vs Details) | Excel Discussion (Misc queries) | |||
Quick Jump to end of list... | Excel Worksheet Functions | |||
Creating a list of directories | Excel Programming | |||
Getting list of directories | Excel Programming |