I
Ian Wong
My case is :
User 1 create a file (abc.txt) on ProgramData\ABC.
User 2 is not right to update the file (abc.txt)
My coding :
If
(My.Computer.FileSystem.GetFileInfo("C:\ProgramData\ABC\abc.txt").Attributes
And FileAttributes.ReadOnly) = FileAttributes.ReadOnly
MessageBox.Show ("File is read only !")
Else
MessageBox.Show
(My.Computer.FileSystem.GetFileInfo("C:\ProgramData\ABC\abc.txt").Attributes)
End If
The result of User 2 :
The message box does not show the "File is read only !" message and show the
number 74344.
If I want to modify the file attributes for all users can modify the file,
what is the coding of VB 2005 ?
User 1 create a file (abc.txt) on ProgramData\ABC.
User 2 is not right to update the file (abc.txt)
My coding :
If
(My.Computer.FileSystem.GetFileInfo("C:\ProgramData\ABC\abc.txt").Attributes
And FileAttributes.ReadOnly) = FileAttributes.ReadOnly
MessageBox.Show ("File is read only !")
Else
MessageBox.Show
(My.Computer.FileSystem.GetFileInfo("C:\ProgramData\ABC\abc.txt").Attributes)
End If
The result of User 2 :
The message box does not show the "File is read only !" message and show the
number 74344.
If I want to modify the file attributes for all users can modify the file,
what is the coding of VB 2005 ?