Purpose: | Remove one or more subdirectories |
Format: | RD [/= /I"text" /K /N[ejt] /Q /R /S] [@file] path... |
or
RMDIR [/= /I"text" /K /N[ejt] /Q /R /S] [@file] path...
path | The name of one or more subdirectories to remove. |
@file | A 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
Usage:
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 ftp://ftp.abc.com/data
RD sets two internal variables:
%_rd_dirs | The number of directories deleted |
%_rd_errors | The number of errors |
(Note that if you do an RD /S, the actual deletions are done by DEL, so check the DEL variables.)
Options:
/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. |
/K | When 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. |
e | Don't display errors. |
j | Ignore junctions |
t | Don't update the CD / CDD extended directory search database (JPSTREE.IDX). |
Note: Do not use /S with @file lists.