|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...
|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.
Internet: Can be used with FTP Servers.
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:
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_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.)
|/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.|
|t||Don't update the CD / CDD extended directory search database (JPSTREE.IDX).|
|/S||This 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.