© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•12mo ago•
9 replies
Erky

How to overwrite a file that is used by another process?

I know which process is locking it, its a .net host instance, but I still want to overwrite my .log file (i want to clear it, when i press a button).

I keep getting
System.IO.IOException: The process cannot access the file
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ "cant open file due to it being used by another process"
C#CC# / help
3y ago
Access file that is being used by another application using FileStream
C#CC# / help
4y ago
Cannot access file because it's being used by another process
C#CC# / help
3y ago