You are writing a script to back up the entire folder C:\Data to D:\Archive. The backup must include every file and all empty subfolders. Which switch combination should you add to the xcopy command to meet this requirement?
The correct switch combination is /s /e. The /s switch copies directories and subdirectories but skips any that are empty. Adding /e extends the operation so that even empty directories are included, ensuring a complete replica of the source folder tree.
Why the other options are wrong:
/s by itself omits empty directories, so the folder structure would be incomplete.
/t /e copies only the directory structure (no files), which does not meet the requirement to copy every file.
/d /y limits the copy to newer files (relative to the destination) and merely suppresses overwrite prompts; it does not guarantee empty directories will be copied.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What options does the xcopy command have for copying files?
Open an interactive chat with Bash
How does xcopy differ from the basic copy command?
Open an interactive chat with Bash
In what scenarios would using xcopy be more beneficial than other copy methods?