VBA to look through all directories for drawings
VBA to look through all directories for drawings
(OP)
I attempting to write a VBA program that looks through all of our drawings for certain items (text, blocks, attributes, etc.). The program will begin with a browse window to select the directory where the search is to begin. It will look through all directories under this directory for AutoCAD files which it will open and look for the text or whatever it's looking for.
Any ideas on how to best do a directory search like this?
Any ideas on how to best do a directory search like this?





RE: VBA to look through all directories for drawings
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: VBA to look through all directories for drawings
That's what I needed.
As usual you have come to my aid
Thanks again.
RE: VBA to look through all directories for drawings
Public Sub GetFileListing(ByVal TargetDirectory)
Debug.WriteLine("Examining " & TargetDirectory)
For Each File As String In System.IO.Directory.GetFiles(TargetDirectory)
'Debug.WriteLine("Adding " & File & " to list")
Files.Add(File)
Next
For Each SubDirectory As String In System.IO.Directory.GetDirectories(TargetDirectory)
GetFileListing(SubDirectory)
Next
End Sub
Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...