How to be sure a file is free to be accessed?

Just starting out? Need help? Post your questions and find answers here.
daft
User
User
Posts: 25
Joined: Fri Oct 29, 2010 10:32 am

How to be sure a file is free to be accessed?

Post by daft »

When a program generates a beg text file, which we want in turn to read, how to know for sure, that the writing's been finished?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: How to be sure a file is free to be accessed?

Post by Trond »

Code: Select all

If ReadFile(0, "Filename")
  ; File opened for reading
Else
  ; File not opened for reading. Either it doesn't exist, or another program is using it
EndIf
Post Reply