SetFileReadOnly
Sets or removes the read only attribute from a file or set of files.
Member of namespace
FileIOSyntax
bool SetFileReadOnly (bool readonly, string filename)
Parameters
- readonly
- Type: bool
- filename
- Type: string
Parameters
- readonly : true turns on the read only attribute, false turns it off.
- filename : The path and filename. Smart parameters and DOS wildcards are allowed.
Returns
Always True.Level
All levels.Details
Sets a the read only attribute of a file, or a group of files. The read only attribute can be set or cleared with this action. Standard DOS * and ? wildcards can be used to affect a change on multiple files at once.- Example
SetFileReadOnly(false, "C:\MyDir\*.*")This example sets all of the files in MyDir as read-write.