[comp.sys.ibm.pc] Help needed with deleting large numbers of files.

marks@tekig.TEK.COM (Mark D. Salzman) (07/16/87)

Hello all you MS/PC-DOS hackers out there.

I am trying to delete a lot of files (>100) in one directory as fast as I
can from within a program. Currently, I am using the DOS delete function
65 (hex 41) to do this. This works fine on just a few files (<10), but gets
VERY long winded with much disk thrashing when there are a lot of files to
delete. I'm getting the file names from a list I keep in memory, so the file
finding functions are not in use when I do the deletions.

Can anyone explain why this function is having so much trouble with large
numbers of files? Is the older DOS delete function 19 (hex 13) any faster?

What makes it even more maddening is that the DOS "del" command can remove
the files in just a few seconds (using wild cards to specify the files).

Any helpful hints or comments welcome.

Mark D. Salzman     Phone (206) 253-5542.  |  The more complex the mind,
Tektronix Inc., P.O. Box 3500, M/S C1-937  |  the greater the need for 
Vancouver, Washington. 98668               |  the simplicity of play.
{world_at_large}!tektronix!tekigm2!marks   |       James T. Kirk