dotnet-Snippets.com
Snippets: 57 | Registered User: 27 | Visitors online: 21
Main Menu

Home
Random Snippet
FAQs
Contact Us
Imprint
RSS Feeds

Rss All languages
Rss C#
Rss VB.NET
Rss C++
Rss J#
Rss ASP.NET
Google Ads

Sri Lanka .NET 
                Forum Member
Remove single attribute from a file

Author: Tim Hartwig
Programming Language: VB.NET Rating:
not yet rated

Views: 697

Description:

With this function you can remove a single attribute from a file



Visual Basic
1
2
3
4
5
6
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



Poor Excellent
1 2 3 4 5 6 7 8 9 10
Sign in to vote for this snippet.

Comments:
(Please log in to wrtite an comment.)