VB - Remove single attribute from a file

By , 4/9/2008
(1 ratings)
With this function you can remove a single attribute from a file
Public Sub RemoveAttribute(ByVal FileName As String, ByVal Remove As FileAttribute)
    Dim Attr As FileAttributes
    Attr = File.GetAttributes(FileName)
    File.SetAttributes(FileName, Attr And Not Remove)
End Sub

Tagged with attribute, file.



Log in, to comment!