correct, sorry about that.

...Tim

From: Crawford, Scott [mailto:[email protected]]
Sent: Thursday, January 14, 2010 8:39 AM
To: NT System Admin Issues
Subject: RE: RMDIR and Wildcards

You need to throw in a /d if you want to match against directories

For /d %f in (<path>\directory*) do rd /s "%f"

From: Gavin Wilby [mailto:[email protected]]
Sent: Thursday, January 14, 2010 10:38 AM
To: NT System Admin Issues
Subject: Re: RMDIR and Wildcards

Hi Tim,

Are you sure that syntax is correct, as it doesnt appear to work here :(

Gavin.
On Thu, Jan 14, 2010 at 4:25 PM, Tim Evans 
<[email protected]<mailto:[email protected]>> wrote:
for %f in (<path>\directory*) do rd /s "%f"

Add /Q if you're brave and don't want to be prompted for each one

...Tim

From: Gavin Wilby [mailto:[email protected]<mailto:[email protected]>]
Sent: Thursday, January 14, 2010 8:05 AM
To: NT System Admin Issues
Subject: RMDIR and Wildcards

Hi,

For one reason or another I have a need to automatically remove certain 
directories (full or otherwise) from a few windows server systems.

As rmdir <path>\directory* /S doesnt appear to work, is there any other way 
that this can be batched and scheduled?

The directories are all called randomnumber.tmp and so I want to wildcard the 
rmdir. Yes, these are directories NOT tmp files.

--
Gavin Wilby,
Twitter: http://twitter.com/gavin_wilby
GSXR Blog: http://www.stoof.co.uk<http://www.stoof.co.uk/>











--
Gavin Wilby,
Twitter: http://twitter.com/gavin_wilby
GSXR Blog: http://www.stoof.co.uk
Sent from Whitehaven, Eng, United Kingdom









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

Reply via email to