Hello,
Anybody know how to delete a 'Read Only File' using VB. I tried Kill and it failed. Solution I have is to use shell("delete /F <Filename>").
Any other suggestions??
Printable View
Hello,
Anybody know how to delete a 'Read Only File' using VB. I tried Kill and it failed. Solution I have is to use shell("delete /F <Filename>").
Any other suggestions??
Try turning off the ReadOnly attribute bit first then "Kill"ing it
private Sub Command1_Click()
Dim MyFile
MyFile = "C:\Vb stuff/things to look at\Daily.ctl"
SetAttr MyFile, GetAttr(MyFile) And (255 - vbReadOnly)
End Sub
should clear its attributes
John G