Hi,
I am trying to find out whether a given folder is a readonly or not. The
code below works great if the folder is on a local drive but does not work if
it is a UNC Path.
The attributes returns 48 for UNC and I am not sure what that is and for
Local drive it returns 17 (Readonly)
Any help regards in this is greatly appreciated.
CODE:
------
Dim checkFile As System.IO.DirectoryInfo
checkFile = New System.IO.DirectoryInfo("\\server\production\data")
Dim attributeReader As System.IO.FileAttributes
attributeReader = checkFile.Attributes
If (attributeReader And System.IO.FileAttributes.ReadOnly) > 0 Then
MsgBox("Directory is read only")
Else
MsgBox("Can write")
End If
Thanks
gbergalli@gmail.com - 24 Mar 2006 02:11 GMT
im getting the3 same error, while trying to find out if a given path on the local drives represents a file or a folder, so far the onlything i thought, is that 48=32+16
32 and 16 are the int values that represent directory and archive