Remove read-only attribute from VBA

S

Siew-Ming

Hi,

Is there a way to remove read-only attribute of a specific folder thru VBA?
I have 25 sites to remove the read-only status whenever I need to install
patches. Instead of going to each site to untag the read-only attribute, I
would like to automate the task if it's possible. I use Microsoft Access
2003.


Thanks,
Sming
 
D

Douglas J. Steele

Why is it read-only? Is it because of NTFS permissions, or simply because
the file's Read-only attribute has been set to True?

If the latter, you can use the VB SetAttr:

strFile = "C:\Folder\File.ext:

SetAttr strFile, GetAttr(strFile) - vbReadOnly

If it's because of NTFS, it's a lot more complicated...
 

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