[comp.sys.ibm.pc] Help on directory sorting

andrews@hpcupt1.HP.COM (Edward E. Andrews) (08/17/89)

I have just finished writing a program that sorts a directory on the disk.
It reads the directory sectors into memory, sorts it, and then writes the
directory sectors back out to the disk.  While testing it on an AT clone I
found it the directory didn't show up as sorted until I changed directories.
That is:
	C:\foo>dir
	z
	y
	x

	C:\foo>sortdir
	z
	y
	x

	C>cd bar

	C:\foo\bar>cd ..

	C:\foo>dir
	x
	y
	z

I've even looked at the directory sectors directly using the Norton Utilities.
It's just as if there is a cache of the directory that is used instead of
reading the directory from the disk.  And I know there is no disk cacheing
program being used.  Does DOS do the cacheing?  Is there something that has
to be flushed?