S shers Well-known member Joined Aug 12, 2007 Messages 86 Programming Experience 1-3 Oct 13, 2008 #1 Hi, How can I check if a file in a network drive has only read only permission, before the file gets opened, in VB.NET? Thanks
Hi, How can I check if a file in a network drive has only read only permission, before the file gets opened, in VB.NET? Thanks
JohnH VB.NET Forum Moderator Staff member Joined Dec 17, 2005 Messages 15,875 Location Norway Programming Experience 10+ Oct 13, 2008 #2 VB.NET: If (IO.File.GetAttributes("filepath") And IO.FileAttributes.ReadOnly) = IO.FileAttributes.ReadOnly Then 'file is readonly End If Upvote 0 Downvote
VB.NET: If (IO.File.GetAttributes("filepath") And IO.FileAttributes.ReadOnly) = IO.FileAttributes.ReadOnly Then 'file is readonly End If