Hello,
I’m trying to delete a .Zip file from my downloads folder. I used the activity Delete, but was given an access issue error. I discovered the .zip property is Read Only and it must be changed before the activity works. The error was: Access to the path '[path].zip' is denied.
I 'm using Invoke Code to change the attribute of the file to remove ‘Read Only’. This code works perfectly when in Debug mode, but once I run the process full speed, the Invoke Code doesn’t work.
I added delays in front and behind the invoke code, and it doesnt seem to help.
Code to remove ‘Read Only’:
Try
System.IO.File.SetAttributes(filePath, System.IO.File.GetAttributes(filePath) Xor FileAttributes.ReadOnly)Catch ex As exception
out_exception=exEnd Try
Any ideas on why Invoke code doesn’t work when running full speed? My goal is to delete the .zip and this was my work around.