Operating Systems

Which command removes an empty folder from the command line?

Show the answer

Correct answerD. rmdir

AWhy not this: md creates a new directory rather than removing one.

BWhy not this: robocopy copies or mirrors files and folders and is not the basic folder removal command.

CWhy not this: dir only lists folder contents and deletes nothing.

DWhy this is right: rmdir (rd) deletes a directory, and by default it works on empty folders.

The rmdir (rd) command deletes a directory; without /s it only removes empty ones. The md command does the opposite by creating a directory.