getAttr = vbDirectory failing on a compressed drive?

  • Thread starter Thread starter roger
  • Start date Start date
R

roger

is getAttr failing on a compressed drive?

trying to tell if a directory entry is a folder or a file:

If GetAttr(CurrPath & strCurrFile) = vbDirectory Then
'do the folder thing
else
'do the file thing
end if

"If" part happens for folders but "Else" doesn't seem to happen on a
compressed drive.

what have I done wrong?
 
On Fri, 31 Jul 2009 07:10:01 -0700, roger

I would think that compressed drives would be transparent to
higher-level functions like VBA.

Btw, I would rewrite this code, because you likely want to do the
folder thing for ANY folder e.g. a Hidden folder or a Hidden Readonly
folder as well:
If (GetAttr(CurrPath & strCurrFile) And vbDirectory) = vbDirectory
Then
'do the folder thing

-Tom.
Microsoft Access MVP
 
Back
Top