Link to home
Start Free TrialLog in
Avatar of AllegisIndia
AllegisIndia

asked on

How to get the directory attributes like file.getattributes in VB.net

The way we get to know the file attributes throughvb.net code (file.getAttributes), how to get folder attributes.
This is required to know whether the folder is read only or not.
ASKER CERTIFIED SOLUTION
Avatar of nayernaguib
nayernaguib
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AllegisIndia
AllegisIndia

ASKER

Ya Nayer,
It works but i need to change little bit.

If use the above code it will return whether its a file or directory.
I wanted whether the directory is Read Only or not.

But modifing your code...
if System.IO.File.GetAttributes("e:\new folder").readonly=1 then
msgbox("This directory is readonly.")
end if

Thanks once again