The below VB Code uses scripting.filesystemobject to go through a bunch of files and remove the read only parameter. I found it quite handy for a scheduled task when dealing with a rouge application.
Dim fl As File
If fso.FileExists(FileName) Then
Set fl = fso.GetFile(FileName)
If (fl.Attributes And ReadOnly) Then
fl.Attributes = fl.Attributes - ReadOnly
End If
End If
Hope this code snippet helps someone else!
Dim fl As File
If fso.FileExists(FileName) Then
Set fl = fso.GetFile(FileName)
If (fl.Attributes And ReadOnly) Then
fl.Attributes = fl.Attributes - ReadOnly
End If
End If
Hope this code snippet helps someone else!