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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Reading a Just created file

Status
Not open for further replies.

TJay

Programmer
Nov 25, 1998
14
0
0
US
I have to SHELL to DOS to run an old program that creates a file. I then execute CLOSE in VB6.&nbsp;&nbsp;Works OK, file is created! BUT, when I try to read the file it's not there ( I assume I have to somehow refresh the directory???? )<br>Any suggestions?<br>When I start the program again, it is there.&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;
 
How are you shelling to dos?&nbsp;&nbsp;Are you executing this old DOS app using the SHELL() function? If so, any commands you perform through this run asynchronously with your VB app, so you may be trying to read the file before it's been closed by the DOS app...which may produce the effects you're getting.&nbsp;&nbsp;How are you trying to read the file?<br><br>Paul
 
TJ -- have a look at karls excellent FAQ entry<br><br>&quot;How to tell if a Shelled/Executed process has ended (32bit mode)&quot; which is in the files area (goodness knows why) of this forums FAQ's<br><br>Run your dos prog that way - so that you can be sure it finished. <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top