how to skip over "system volume information"

On my Win2000, VB6 machine:

Using the Filesystemobject in VB to recursively examine some folders, one of the folders that appears is the "system volume information".  Its properties are Read only, hidden, system, directory, archive.  A folder object can be set to this, but for recursive purposes, I access the folderobject.subfolders collection.  But the program crashes at this point, runtime error 70: permission denied.  Same type of error when trying to click on this folder in explorer...  I can see it in the explorer folded view, but cant get into it.

I don't really care about that folder anyways, so I want to skip over it at that point and continue with the other folders in the list, but I want a method specific to that special type of special folder.

I want to include other hidden, system folders in my examination, so using the file attributes to exclude it are out of the question.  I've gone batty looking at each fso and folder property to see if theres something unique for that folder, but don't see anything.

Will this folder ALWAYS be called "System volume information" and allow a folder name exclusion?  Will this folder always be in the C:\ path, or will one exist for each NTFS drive?  Is this something that originated in NT and carries through to XP, or is it unique to Win2000?  Is there an equivalent XP complicated folder?
Does win98 or win95 have any bizarre folders like this - I think not, as I'm sure I one used a similar recursive approach on a Win98 system, but now I'm beginning to doubt myself...
LVL 6
GPrentice00Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DeAnCommented:
quick way, add this to top of sub that error happens.

On Error Resume Next
0
GPrentice00Author Commented:
On Error Resume Next

Yes, it does work, but much like using   As Any  in my API declarations, I would rather juggle flaming chainsaws.

0
DeAnCommented:
not sure if this will help..

'Attribute 8 is: Disk drive volume label, read-only.

Dim fs, f
Dim FilePath As String
FilePath = "C:\Path\To\file.ext"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(fs.GetFileName(FilePath))
If f.Attributes <> 8 Then
    'do your thing...
End If
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

GPrentice00Author Commented:
the FSO system will allow you to set a folder object to the "system volume information" path, but as soon as you try to set a folder to the subfolder collection for it, or if you try to set access the filepath for "system volume information" files, it hits the error.  

Your code is the correct way to examine a single file of specified path, (actually it still likely to crash as it is: you should first check if it exists), but took the fork in the road long ago diverging it from the problem at hand..

But thanks for trying still!


0
GPrentice00Author Commented:
DeAn

I'm a bit torn.  Technically, your On Error  solution is a correct answer (one that I should have specified in my Q that I was not wanting to use, but I didnt), although not an answer I find satisfactory.

If you insist, I'll give you 20pts in a new question, and clear this.

The question as it stands is still open for answers - few questions are ever finalized, there's always a better way.
But for practical purposes, this issue is moot at this time now.

0
GPrentice00Author Commented:
Will post request for closure
0
SpideyModCommented:
A request for a refund has been made.  Experts you have 72 hours to object to the refund.

SpideyMod
Community Support Moderator @Experts Exchange
0
SpideyModCommented:
PAQ'd and all 65 points refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.