04-02-2024, 03:08 AM
Deleting files using the built-in functions in C# throws an error, but using the LA function deletes them successfully. Why?
System.UnauthorizedAccessException: Access to the path 'C:\Users\Administrator\Desktop\240402_105050.dat' is denied.
at line 5 in Script2.cs
>>
--- Raw stack trace ---
at System.IO.FileSystem.DeleteFile(String fullPath)
at Program.<Main>$(String[] args) in C:\Users\Administrator\Documents\LibreAutomate\Main\files\Script2.cs:line 5
System.UnauthorizedAccessException: Access to the path 'C:\Users\Administrator\Desktop\240402_105050.dat' is denied.
at line 5 in Script2.cs
>>
--- Raw stack trace ---
at System.IO.FileSystem.DeleteFile(String fullPath)
at Program.<Main>$(String[] args) in C:\Users\Administrator\Documents\LibreAutomate\Main\files\Script2.cs:line 5