Directory Stucture

FloBob

Registered User.
Local time
Yesterday, 19:05
Joined
Jul 19, 2002
Messages
108
I have an issues where I need to analyze a CD and put all file names with there extensions into a database. These CD's have different directory structures though I dont need to capture that information as much as the files and theres extensions. Does anyone know how I can make a complete list of all files in that stucture including ones that are in folders and subfolders. Thanks a bunch any help would be appreciated, Ive done several searches and I cant seem to find this question.
 
Look in the Help Files for the FindFile object.

You can give it a wildcard specification starting from your drive's root directory as input, set the option to search subdirectories, then activate the .Execute method (I think that's right), then you can look at the collection of ".FoundFiles" to see the individual file specifications.

There is a .FoundFiles.Count to tell you how many files you found, and you can get the actual specs from .FoundFiles(n) where the (n) runs from 1 to the count. I don't recall which property you want to get the actual spec. Maybe .Name?

In any case, that is where you look.
 
Thanks so much thats going to work.. One more question. Do you happen to know how to get the name of the CD (the one that shows up next to the drive when the CD is in). I could use that name to find out if that CD has already been inputed or not.

Thanks again.
 
I think you are going to need to call something from the Win32.DLL library for that one. Unfortunately, I don't have that reference book handy. Packed away since the last time I moved, and I have yet to desperately need it. At least, not desperate enough to unpack.

Try doing a search of the Windows knowledge base for "Drive labels" or "volume labels" or "disk labels." They might have something useful.
 
See here and see Command3.
Command3: How to iterate through folders using FileSystemObject and the Folder object.
Hope this helps!
:)
 

Users who are viewing this thread

Back
Top Bottom