getAttr = vbDirectory failing on a compressed drive?

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?
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top