Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Faster DELTREE command ?

Status
Not open for further replies.

J741

Technical User
Jul 3, 2001
528
CA
O.K. I use a boot diskette to boot to a command prompt and do a virus scan. At the start of that process I delete temporary files using the DELTREE comamnd. ( deltree c:\windows\temp ). Depending on how many temporary files are in that directory, this can take _HOURS_ to complete. When done manually from within Windows' Safe Mode, the same process takes less than 5 minutes.

So, does anyone know of a faster way to delete a directory from the command prompt from a boot diskette?
 
Windows use a smartdrive mechanism. For DOS you have to load SmartDrv.exe yourself.

Edit autoexec.bat, put this on the last line:

Smartdrv 8192 8192

It should work much faster :)

Notes: it is better to flush the cached before reboot/turn off the computer, by typing "smartdrv /c" at DOS prompt. Do it 2-3 times.


-- AirCon --
 
How about deleting the files rather than deleting the directory.
Deltree goes back to the folder on each deletion and delete wipes out the file entry without going back.
Once the deletion is finished you can deltree to get rid of all the directory extensions.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
Thanks AirCon. I'll try SmartDrv and see if it makes a difference.

Edfair, I can't delete just the files, because I use this method in an unattended batch file on multiple systems where the files to be deleted are often in multiple nested subdirectories with names that are not known beforehand.
 
If I can extend this thread just a little, can someone explain the purpose of the '8192 8192' part of the
'Smartdrv 8192 8192' entry?
I've often used the smartdrv command, but without any extras. What do they do please, and should I be using them?
Thanks,
Andy.





Regards, Andy.
**************************************
My pathetic attempts at designing a private web site can be laughed at here:
 
Thanks for that, Freestone, and thanks for providing the link, it explained everything.
Regards,
Andy.

Regards, Andy.
**************************************
My pathetic attempts at designing a private web site can be laughed at here:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top