From: Ayronski on
As the convenient File.SetAttribute() and File.GetAttribute() do not
exist in the compact framework, I thought I'd share another method of
changing file attributes using FileInfo:

FileInfo fileInf = new FileInfo(myFilePath);

if ((fileInf.Attributes & FileAttributes.ReadOnly) ==
FileAttributes.ReadOnly)
{
fileInf.Attributes = FileAttributes.Normal;
}

HTH.

-ak