Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My code is reading a file before it's saved (repeated)

Status
Not open for further replies.

RoyVidar

Instructor
Jun 16, 2000
6,606
NO
I'm doing a sequential read from a textfile downloaded through the Shell Function and DOS FTP.<br><br>My problem is that the following Code starts reading this before it's saved.<br><br>Now, I bypass this by adding some time and doing some loops, but isn't there a better way, with a bit more control over the process? Cause this is going to fail from time to time, and I don't want the system to be &quot;FTPing&quot; all the time;-)<br><br>In previous posting, Jonathan suggested using &quot;WinINet API&quot;, but I don't seem to find the right documentation. <br><br>Anyone have some experience, or snippets to share? <br><br>Thanx, Roy-Vidar
 
Have you been after this for a while???<br><br>If it opens the text file before its done what happens?<br><br>Can you look for a character at the very end of the file. If its not there then close the file and try again in a few seconds??? <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Thanx for your interest and answer!<br><br>I haven't been after it for a very long time;-) <br><br>What happens when the text file is opened before it's saved, is that after processing 23% of the file, I get a message telling me that the read has exceeded the length of the file. This happens without any EOF, EndOfTextStream or other criterias kick in.<br><br>As mentioned, the app bypasses this by adding some waiting time (and checking for it's existence, size, looping if not.. etc), but since the app is supposed to feed other systems and customers at given time intervals, the time is a critical factor. So having a bit more control over the download, is &quot;desperatly wanted&quot;;-)<br><br>Thanx<br>Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top