Re: How to Search C:\ to find a file
From: Michael Harris \(MVP\) ("Michael)
Date: 03/11/05
- Next message: Michael Harris \(MVP\): "Re: xml /text-file issue"
- Previous message: Michael Harris \(MVP\): "Re: Aaagh! cScript no longer Returning! ??"
- In reply to: Jimbo: "Re: How to Search C:\ to find a file"
- Next in thread: Billy: "RE: How to Search C:\ to find a file"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Mar 2005 17:47:01 -0800
>> set fso = createobject("scripting.filesystemobject")
>> set fo = fso.getfolder("C:\System Volume Information")
>> msgbox fo.files.count '==> Permission denied...
>
> Excuse my ignorance but how would I code it to not look in the System
> Volume Information folder?
>
> Thanks
Assuming some sort of recursive procedure that gets an FSO folder object
passed as an argument...
.
..
...
Call walkFolder(someRootFolder)
...
..
.
sub walkTree(objFolder)
if objFolder.Name = "System Volume Information" then
exit sub
end if
for each file in objFolder.Files
'blahblah
next
for each folder in objFolder.SubFolders
Call walkTree(folder)
next
end sub
-- Michael Harris Microsoft MVP Scripting http://maps.google.com/maps?q=Sammamish%20WA%20US
- Next message: Michael Harris \(MVP\): "Re: xml /text-file issue"
- Previous message: Michael Harris \(MVP\): "Re: Aaagh! cScript no longer Returning! ??"
- In reply to: Jimbo: "Re: How to Search C:\ to find a file"
- Next in thread: Billy: "RE: How to Search C:\ to find a file"
- Messages sorted by: [ date ] [ thread ]