cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting read-only files

lukas_mesko
Level 2
Hi guys, I wonder if you can help with an issue I'm facing when deleting read-only files using the Utility - File Management object. To be specific, I'm trying to delete read-only .xlsx files when doing folder clean up after the robot runs. Is there a way to do this? Thank you very much for your time. Lukas
1 REPLY 1

AdamSørensen
Level 3
check out https://msdn.microsoft.com/en-us/library/system.io.file.delete.aspx remember to strip the read-only attribute. You can set the files attributes using File.SetAttributes().