How can I close a file left open by another process?

  • Thread starter Thread starter vaughn
  • Start date Start date
V

vaughn

I'm trying to access a text file that was created by another process but I
keep getting the contents of the file before the external process modified
it.
I believe the previous process left it open and doesn't let me access it.
Is it possible for me to close the file before using in order to make sure
that I have complete access?
Even if it's not open, I'd like to make sure.
Thanks.
 
The external process that was modifying the file was a DOS application.
Apparently, my application was accessing the file before the process would
finish. I added the WaitForExit() method and apparently it worked.
 
Back
Top