file attributes

To see if a file has a readonly attribute use the FileInfo class and its Attributes property:
Code:
  Dim f As New IO.FileInfo("path to the file")
  If (f.Attributes And IO.FileAttributes.ReadOnly) = IO.FileAttributes.ReadOnly Then
      MessageBox.Show("Read only.")
  End If
 
Back
Top