No error messages for RD /S ?

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,602
46
Albuquerque, NM
prospero.unm.edu
#1
It appears that RD with the /S option does not show error messages when an error occurs. RD without /S does display error messages; so does a DEL command equivalent to RD /S:


Code:
C:\>ver
 
TCC  9.02.147   Windows XP [Version 5.1.2600]
 
C:\>rd /s Foo\
C:\Foo\* : Are you sure (Y/N)? Y
 
C:\>rd /s Foo\
C:\Foo\* : Are you sure (Y/N)? Y
 
C:\>rd Foo\
TCC: (Sys) The directory is not empty.
 "C:\Foo"
 
C:\>del /s /x /z Foo\*
C:\Foo\* : Are you sure (Y/N)? Y
Deleting C:\Foo\LockedFile.exe
TCC: (Sys) Access is denied.
 "C:\Foo\LockedFile.exe"
TCC: (Sys) The directory is not empty.
 "C:\Foo"
     0 files deleted
 
C:\>
(Aha! <CODE>tags prevent the forum software from stripping leading/trailing spaces from copied text!)

</CODE>
 

samintz

Scott Mintz
May 20, 2008
1,271
11
Solon, OH, USA
#2
(Aha! <code> tags prevent the forum software from stripping leading/trailing spaces from copied text!)
FWIW - the email I received did not contain the word \<code\> in the text. I see "Aha! tags..."

The tags Charles is referring to are \[code\] and \[/code\]. I tried to escape the leading and trailing brackets in the previous sentence. So I don't know if it worked.

-Scott
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,602
46
Albuquerque, NM
prospero.unm.edu
#3
In build 149, it gives a "directory is not empty" error. Which is reasonable, and alerts the user that an error has occurred. It would be nice to see the name of the file which could not be deleted, if that wouldn't require major changes to DEL / RMDIR.
 

rconn

Administrator
Staff member
May 14, 2008
10,551
97
#4
Charles Dye wrote:

> In build 149, it gives a "directory is not empty" error. Which is
> reasonable, and alerts the user that an error has occurred. It would be
> nice to see the name of the file which could not be deleted, if that
> wouldn't require major changes to DEL / RMDIR.
It would require major changes to RD. I'll put it on the suggestion
list for v10.