Failure to delete screenshots after raid
I'm just starting using TarkovMonitor, so I might be missing something obvious, but after a test raid on the factory (scav, PVE mode), I got the following error:
Error deleting screenshot: Access to the path 'C:\Users\Rui Apostolo\Documents\Escape From Tarkov\Screenshots\2025-10-22[23-20]_-31.94, -1.16, 30.08_0.02843, 0.18186, -0.00526, 0.98290_13.12 (0).png' is denied. at System.IO.FileSystem.DeleteFile(String fullPath)
at System.IO.File.Delete(String path)
at TarkovMonitor.MainBlazorUI.Delete_Screenshots(RaidInfoEventArgs e, MonitorMessage monMessage, MonitorMessageButton screenshotButton) in TarkovMonitor\MainBlazorUI.cs:line 205
The screenshot->position update during the raid worked fine otherwise
1.) Assuming you still had TarkovMonitor running it may have ran into a condition where it simply wasn't capable of removing it due to it being "checked out / locked" in use by either EFT or TarkovMonitor at that timing.
2.) However if you notice even after closing TarkovMonitor and maybe even a full reboot that image still there and still "denied access" I would assume its most likely a permission issue.
But now I'm just guessing based off what I was provided since you never lead with any resulting outcome.
One thing I would suggest (Shouldn't be required but for general reference):
- "Run as Administrator" for TarkovMonitor, that should avoid most edge cases, unless its a protected system path OR file still in use by another process.
Let me know if you have more info though. 90% likely this post was just excess info thanks to ADHD. Most likely it was just an occasional one off issue where the screenshot wasn't yet ready to be removed safely and threw an exception. (Option 1 - Race Condition)
Hopefully you read this though and learned something from it at the minimum if nothing else. 😆
Hi,
Sorry if I wasn't clear - that error was in TarkovMonitor. I was able to delete the images manually (while both the game and TarkovMonitor were running).
I haven't had a chance to use it further since, I'll test it again over the weekend and share results or any other info I can find.
I assume there is most likely "Garbage collection" implemented that automatically deletes the screenshots as they're taken and used to update location, which would be the cause it likely just tried to delete the screenshot too fast similar to if someone was using something and you tried to take it away they usually try to stop you until they're done with it thats what happened here it seems if anything if it becomes persistent if my assumption is correct @Razzmatazzz would have to correct me if im wrong all it needs is a bit longer timeout or to check if it can delete before attempting to.
I ran some more raids this weekend and the issue remains. I ran TarkovMonitor as an admin, and the result was the same:
~~I noticed that the path in the error message is wrong - it should be C:\Users\Rui Apóstolo\Documents\Escape from Tarkov\Screenshots (note the ó in Rui Apóstolo) -- maybe the app is not handling this properly?~~
Actually, while windows explorer shows the accent in GUI:
the path doesn't seem to have it:
It is strange that the file path doesn't show the accent, but the app isn't doing anything to remove such characters from the path. It's strange that the error doesn't say the file was not found, but rather that access to that path is denied. The documentation for the System.IO.FileSystem.DeleteFile method that is throwing the error shows that will throw a specific exception if the file is not found but throws other exceptions if there are insufficient permissions to view the path or access the file. The error message shown The message "Access to the path ... is denied" indicates to me that it's throwing a SecurityException because for some reason access to that path was denied.
All that to say, it seems like something odd is going on with the permissions for files in that path.