Newsgroups: comp.windows.ms
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!maytag!watstat.waterloo.edu!dmurdoch
From: dmurdoch@watstat.waterloo.edu (Duncan Murdoch)
Subject: Re: Warning about terminating DOS windows
Message-ID: <1991May13.015116.163@maytag.waterloo.edu>
Sender: news@maytag.waterloo.edu (News Owner)
Organization: University of Waterloo
References: <1319@uqcspe.cs.uq.oz.au>
Date: Mon, 13 May 1991 01:51:16 GMT
Lines: 30

In article <1319@uqcspe.cs.uq.oz.au> rhys@cs.uq.oz.au writes:
>Hi all!
>
>This is a little warning about what can happen to your hard drive if you
>terminate DOS applications using Windows 3.0 "Settings/Terminate" (sometimes
>you REALLY need to do this, especially when writing programs).  I've found
>this out the hard way.
>
>If your DOS program has been writing output to a file (especially when it's
>creating a new file), then every block is marked as "unmoveable" while the
>file is being created, and the directory is not updated until the file is
>closed.  This is pretty standard practice where two or more applications may
>happen to access the same file (not that I like this practice though).

I don't think blocks are really being marked as "unmoveable".  (DOS has no
way to do that.  Norton may call them that, just because it doesn't understand
what they're for.)  I think it's just
the fact that the directory isn't updated until the file is closed that's
causing the trouble.  The file gets recorded in the FAT but not the directory,
so it takes up space without being accessible.

The easy way to fix this is to run CHKDSK /F - but don't do this while 
multitasking!  Some programs are likely to get very confused if CHKDSK cleans
up their open files.  It's safest to close down Windows, reboot, and run CHKDSK
from plain DOS.  You'll get the files back as FILEnnnn.CHK, and can probably
recover their contents if you need to.

Duncan Murdoch
dmurdoch@watstat.waterloo.edu

