Just trying to copy everything except a couple of directories from a drive to my NAS
This is the secret incantation of robocopy
when running in a Power Shell Terminal on Windows 11
robocopy d:\ \\mynas\toggen\DATA\ *.* /XD 'D:\$RECYCLE.BIN' 'D:\.Trash-1000' /E /Z
From source drive D:\
copy all files and directories (*.*)
including empty ones (/E)
If we have to restart don't recopy partial files but restart where you left off (/Z)
exclude the following directories for the copy (/XD 'D:\$RECYCLE.BIN' and 'D:.Trash-1000')
Because we are using a Powershell terminal use single quotes to stop Powershell thinking `$RECYCLE.BIN' is a variable
0 Comments