Hi John,<div><br></div><div>All I can say is that I came across this before and resolved it in much the same way. I looked up the issue at the time and there was some convoluted explanation but in the end <span class="Apple-style-span" style>I just put it down to the programmer (me) being so fast that even a computer couldn't keep up. I could live with that explanation.<span></span></span></div>
<div><br></div><div>This was about 10 years ago.</div><div><br></div><div>Steve<br><br>On Thursday, 12 April 2012, John Bird wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" lang="EN-NZ" vlink="purple" link="blue">
<div dir="ltr">
<div style="FONT-FAMILY:'Verdana';COLOR:#000080;FONT-SIZE:12pt">
<div>I came across an oddity in a program that creates lots (eg 30,000+) files
exporting selected data from a database.</div>
<div> </div>
<div>Some files disappear on slower PCs even though they are
created.</div>
<ul>
<li>Files are created in a thread using TFilestream, in a loop
</li><li>Each file is being checked that it gets created using a if
FileExists(filename) in the loop and they always seem to be there.
</li><li>Files are written at the rate of around 20-30 per second and are mostly
around 3KB in size.
</li><li>At the end of the big loop a list of files created is created by the usual
FindNext code.
</li><li>On some slower PC’s (XP or Server 2003) some files are missing.
Faster PC’s with Win7 have all the files. All PC’s are VMs.
</li><li>Files missing might range from 10 to 500, never the same number
</li><li>The problem can be cured by putting a 2 millisecond sleep between creating
each file. 1 Millisecond is not enough.</li></ul>
<div>Can anyone shed any light on why this might be the underlying issue and why
a sleep might fix it?</div>
<div> </div>
<div style="FONT-FAMILY:'Verdana';COLOR:#000080;FONT-SIZE:12pt">John
Bird<br></div></div></div></div>
</blockquote></div><br><br>-- <br><br>Steve Peacocke<br>Mobile: 0220 612-611<div><div><a href="http://nz.linkedin.com/pub/steve-peacocke/1/a06/489" target="_blank">Linkedin Professional Profile</a></div></div><br>