not sure rmdir will let you delete a directory that has *any* contents,
including subdirectories...
 
if you always want to delete the entire contents of c:\directory,  I'd
suggest scripting with something like KILLDIR  < long link, watch for wrap >
 
( http://www.google.com/url?sa=U
<http://www.google.com/url?sa=U&start=1&q=http://shareware.pcmag.com/product
.php%255Bid%255D43808%255Bcid%255D72%255BSiteID%255Dpcmag&usg=AFQjCNHEtB-0k_
UGjq2jTqjeO9BeF86w_g>
&start=1&q=http://shareware.pcmag.com/product.php%255Bid%255D43808%255Bcid%2
55D72%255BSiteID%255Dpcmag&usg=AFQjCNHEtB-0k_UGjq2jTqjeO9BeF86w_g )
 
 
and script
 
c:
cd\
killdir c:\directory
md directory
 
if you have any special permissions to directory you'll need to recreate
those as well 
 

Erik Goldoff


IT  Consultant

Systems, Networks, & Security 

 

  _____  

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



If I use that, will it remove the root directory as well, or just the sub
directory stuff?

 

Eg:  rmdir c:\directory /q /s

 

Will that leave me with c:\directory, or just c:\?

 

thanks

 

Clayton Doige

IT Project Manager

CME Development Corporation

T: 020 7430 5355

M: 07949 255062

E:[EMAIL PROTECTED]

W:www.cetv-net.com

From: James Rankin [mailto:[EMAIL PROTECTED] 
Sent: 28 October 2008 12:36
To: NT System Admin Issues
Subject: Re: Slightly OT DOS Syntax Q

 

Try using rmdir instead

2008/10/28 Clayton Doige <[EMAIL PROTECTED]>

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

 

 

 

 

 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
______________________________________________________________________


______________________________________________________________________
This electronic mail message and any attached files contain information
intended for the exclusive use of the person(s) to whom it is addressed and
may contain information that is proprietary, privileged, confidential and/or
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any viewing, copying, disclosure or
distribution of this message or its contents may be subject to legal
restriction or sanction. If you have received this message in error, please
notify the sender immediately by electronic mail and delete the original
message and any attachments without retaining any copies.
_____________________________________________________________________



 


 

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.4/1749 - Release Date: 10/27/2008
10:44 PM



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

Reply via email to