RD / RMDIR Usage

Jan 19, 2011
614
15
Norman, OK
TCC 12.10.60 Windows XP [Version 5.1.2600]

Am I doing something wrong?

HTML:
[C:\test]dir

 Volume in drive C is unlabeled      Serial number is 58b8:a853
 Directory of  C:\test\*

 4/08/2011  09:14         <DIR>    .
 4/08/2011  09:14         <DIR>    ..
 3/30/2011  12:20         <DIR>    directory1
 3/30/2011  12:20         <DIR>    directory2
 3/30/2011  12:20         <DIR>    directory3
 3/30/2011  12:20              13  file1
 3/30/2011  12:20              13  file2
 3/30/2011  12:20              13  file3
                39 bytes in 3 files and 5 dirs    12,288 bytes allocated
    34,400,354,304 bytes free

[C:\test]rd /q /s /nt "*"
TCC: (Sys) The parameter is incorrect.
 "nt"
Usage : RD [/I"text" /K /N[et] /Q /R /S] path ...

[C:\test]
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,689
106
Albuquerque, NM
prospero.unm.edu
RD won't allow you to combine wildcards with /S. If you really, really want to do this, put your RD in a FOR loop:

Code:
for /d %d in ( * ) echo rd /s /q /nt "%d"
 
Jan 19, 2011
614
15
Norman, OK
RD won't allow you to combine wildcards with /S.
OK. I see that now in the help file. However, that would never have crossed my mind given the error message I was given.
 
Apr 2, 2011
1,607
15
55
North Carolina, USA
I think it should be /n:t
----- Original Message -----
From: JohnQSmith
To: CSGalloway@nc.rr.com
Sent: Friday, April 08, 2011 10:18 AM
Subject: [Support-t-2766] RD / RMDIR Usage


TCC 12.10.60 Windows XP [Version 5.1.2600]

Am I doing something wrong?


HTML Code:
[C:\test]dir

Volume in drive C is unlabeled Serial number is 58b8:a853
Directory of C:\test\*

4/08/2011 09:14 .
4/08/2011 09:14 ..
3/30/2011 12:20 directory1
3/30/2011 12:20 directory2
3/30/2011 12:20 directory3
3/30/2011 12:20 13 file1
3/30/2011 12:20 13 file2
3/30/2011 12:20 13 file3
39 bytes in 3 files and 5 dirs 12,288 bytes allocated
34,400,354,304 bytes free

[C:\test]rd /q /s /nt "*"
TCC: (Sys) The parameter is incorrect.
"nt"
Usage : RD [/I"text" /K /N[et] /Q /R /S] path ...

[C:\test]
 
May 20, 2008
12,167
133
Syracuse, NY, USA
On Fri, 08 Apr 2011 16:42:40 -0400, Charles G <> wrote:

|I think it should be /n:t

It seems OK without the colon:

Code:
v:\> rd /ne no-exist

v:\> rd no-exist
TCC: (Sys) The system cannot find the file specified.
 "V:\no-exist"
 

rconn

Administrator
Staff member
May 14, 2008
12,556
167
[C:\test]rd /q /s /nt "*"
TCC: (Sys) The parameter is incorrect.
"nt"
Usage : RD [/I"text" /K /N[et] /Q /R /S] path ...

Not reproducible here -- I get (as expected):

TCC: (Sys) The directory name is invalid.
"C:\test\*"

Do you have an alias for RD (or a plugin that is intercepting the call)?

<DIR><DIR><DIR><DIR><DIR>

</DIR></DIR></DIR></DIR></DIR>
 

Similar threads