"Nick Sabalausky" <a@a.a> wrote in message news:jkl7fd$1rqs$1...@digitalmars.com... > > Windows is known to enjoy holding locks on files just for the fuck of it. > See if the behavior changes if you add some delay just before the last > line. Or, if you adjust it so that compiling test.d takes longer. >
If it still fails with the delay, you can probably find out (for whatever help it might be) what process is holding the file open by adding a pause right after running "test". Then before "Press[ing] a key" as it suggests, run SysInternal's Process Explorer to see who has the file open. My guess would be some basic Windows system process, but who knows.