Date: Thu, 8 May 1997 20:09:36 +0300 (IDT) From: Eli Zaretskii To: Paul Campisi cc: djgpp AT delorie DOT com Subject: Re: Exclusive access to drive In-Reply-To: <199705081540.LAA01261@banana.ece.uc.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 8 May 1997, Paul Campisi wrote: > system("chkdsk"); > it gives me something like - CORRUPTED FAT TABLE > > system("chkdsk /f"); > it gives me "unable to get exclusive access to drive x" (where x is > the drive I am using chkdsk on) I think the reason is that CWSDPMI opens a swap file to support virtual memory, and CHKDSK complains because the directory entry for the swap file isn't updated until you exit your program (at which point CWSDPMI closes and deletes the swap file). It is generally not recommended to run CHKDSK while another program has some files open. If you try that from Windows' DOS box, for example, you will also see error messages from CHKDSK. > or is there any other way to run the chkdsk command? You didn't explain why do you need to run CHKDSK in the middle of your program. So it's hard to answer this question.