I believe robocopy already does this by default. Still, you could force it to copy by folder. Make a .bat file of this code:
for /d %%a in ("\\sourceserver\share1\*") do (
ECHO robocopy "%%~a" "\\destinationserver\share1\%%~na" /MIR /SEC /LOG+:c:\copy.log
)
Note: The code is in test mode for visual validation. Open a Command Window and run it.
When you are satisfied how it shows the command, remove the ECHO prefix to run it for real.
ASKER
Thanks, everyone!
TRUSTED BY
ASKER
Anyone knows the command parameters to copy the subfolder names and securities only?