In my scripts, I do this:

cd x:\directory
rmdir x:\directory /s /q


This way the dir can't be deleted, as your in it.

From: Clayton Doige [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2008 6:33 AM
To: NT System Admin Issues
Subject: Slightly OT DOS Syntax Q

Dusting off some DOS and drawing a mind blank.

Wrote a short little batch file with the idea being that everything (files and 
folders) within in a certain directory is blown out everyday. Goes like this:

del c:\directory\ *.* /Q /S

this proceeds to delete every file in every subdirectory without user 
intervention, however it leaves the subfolders in place.

What switch do I use to get rid of the folders as well?

Thanks

Clayton





~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to