Set File Attributes
The System.IO namespaces contain types that support input and output, including the ability to read and write data to streams either synchronously or asynchronously.
FileInfo Class Provides instance methods for the creation, copying, deletion, moving, and opening of files. FileSystemInfo.Attributes property is used to gets or sets the attributes for the current file or directory.
The following vb.net program shows how to set readonly and hidden property to a file .