Check if a file has archive attribute in C#

bool isArchive = ((File.GetAttributes(filePath) & FileAttributes.Archive) == FileAttributes.Archive);

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.