

Why did robocopy only copy the “Windows Defender” folder? Because the other folders are empty, the /s command will exclude subdirectories that are empty. Here is a screenshot showing the comparison between the source and destination folders. This will exclude any empty subdirectories. In this example, I’m going to copy all the files and folders from c:\share to the folder c:\it\dst on the same computer. Copy Contents Exclude Empty Subdirectories The /l is a great command to help you understand what it would have done without making any real changes. This time the test showed it would copy a bunch of files and directories. I’ll run another test and include the /e option. You can see below this command would have copied one directory.

This is a great way to test a command without making any real changes, it will show you what it would have done. You can test a file copy with the /l command. Test A File Copy Without Any Real Changes In this guide, I’ll show you the best robocopy commands and examples. Robocopy has many command line options and it can be overwhelming to know which commands to use. Looking for a list of robocopy examples and useful commands? Then look no further.
