Use the delete and rd commands to delete files and remove directories. Directories can be removed even if they contain files and subdirectories. To remove a directory that contains files and subdirectories, use the rd rf command. When files or directories are deleted, they cannot be recovered.
The force option deletes the file or directory without prompting the user to confirm.
Use the following CLI syntax to delete files and then remove directories:
file#
— delete file-url [force]
— rd file-url [force]
The following displays an example of the command syntax:
A:ALA-1>file cf1:\test1\ # delete test.cfg
A:ALA-1>file cf1:\test1\ # delete abc.cfg
A:ALA-1>file cf1:\test1\test2\ # cd test3
A:ALA-1>file cf1:\test1\test2\test3\ # cd ..
A:ALA-1>file cf1:\test1\test2\ # rd test3
A:ALA-1>file cf1:\test1\test2\ # cd ..
A:ALA-1>file cf1:\test1\ # rd test2
A:ALA-1>file cf1:\test1\ # cd ..
A:ALA-1>file cf1:\ # rd test1
A:ALA-1>file cf1:\ #
Use the following CLI syntax to remove a directory without first deleting files or subdirectories:
file
— rd file-url rf