Please enable JavaScript to view this site.

Take Command / TCC Help v. 29

Navigation: TCC > Commands


Scroll Prev Top Next More
Purpose:Remove one or more subdirectories


Format:RD [/= /I"text" /K /N[et] /Q /R /S] [@file] path...


RMDIR [/= /I"text" /K /N[et] /Q /R /S] [@file] path...


pathThe name of one or more subdirectories to remove.
@fileA text file containing the names of the directories to remove, one per line (see @file lists for details).



See also: MD.


File Selection


Supports command dialog, extended wildcards, ranges, multiple file names, and include lists. Use wildcards with caution on LFN volumes; see LFN File Searches for details.


Internet:  Can be used with FTP Servers.


File Completion Syntax:


The default filename completion syntax is: dirs




RD and RMDIR are synonyms. You can use either one. If you don't specify any arguments, RD will display its command dialog.


RD removes directories from the directory tree. For example, to remove the subdirectory MEMOS from the subdirectory WP:


rd \wp\memos


Before using RD, you must delete all files and subdirectories (and their files) in the path you want to remove. Remember to remove hidden and read-only files as well as normal files (you can use DEL /Z to delete hidden and read-only files).


You can use wildcards in the path.


When removing a directory on an LFN drive, you must quote any path which contains white space or special characters.


If RD deletes one or more directories, they will be deleted from the extended directory search database. If TCC is in a Take Command tab window, it will notify Take Command of the directory removal so Take Command can update its File Explorer window.


You cannot remove the root directory, the current directory (.), any directory above the current directory in the directory tree, or any directory in use by another process. RD will delete hidden directories, for compatibility with CMD.


You can remove directories on FTP servers. For example:




RD sets two internal variables:


%_rd_dirsThe number of directories deleted
%_rd_errorsThe number of errors


(Note that if you do an RD /S, the actual deletions are done by DEL, so check the DEL variables.)




/=Display the RD command dialog to help you set the directory and command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.


/I"text"Select directories by matching text in their descriptions. The text can include wildcards and extended wildcards. The search text must be enclosed in double quotes, and must follow the /I immediately, with no intervening spaces. You can select all filenames that have a description with /I"[?]*", or all filenames that do not have a description with /I"[]". Do not use /I with @file lists. See @file lists for details.


/KWhen used with the /S option, this will physically delete files instead of sending them to the Windows Recycle Bin, even if you have the Delete to Recycle Bin configuration option set.


/NThis option takes two possible arguments:


eDon't display errors.
tDon't update the CD / CDD extended directory search database (JPSTREE.IDX).


/QWhen used with the /S option, this will suppress the prompt before deleting the directories.


/RWhen used with the /S option, this will send the deleted files to the Windows Recycle Bin.


/SThis option is included only for compatibility with CMD, and should be used with EXTREME CARE!!  It deletes all files (including hidden and system files) in the named directory and all of its subdirectories, then removes all subdirectories. It can potentially erase all files on a drive with a single command. You cannot use wildcards with the /S option.


Note: Do not use /S with @file lists.