469,913 Members | 2,648 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

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

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.


Nov 15 '05 #1
1 2581
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.
"vaughn" <VM> wrote in message news:ON**************@TK2MSFTNGP09.phx.gbl...
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.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

22 posts views Thread by Bryan | last post: by
2 posts views Thread by Bruce Wiebe | last post: by
7 posts views Thread by Alice | last post: by
3 posts views Thread by ssg31415926 | last post: by
37 posts views Thread by Jan Tovgaard | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.