Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

No error messages for RD /S ?

Charles Dye

Super Moderator
May
4,972
128
Staff member
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>
 
(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
 
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.
 
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.
 

Similar threads

Back
Top