

Step 2 moves out all the folders that are not the target pattern into some temp folder (i.e all folders that do not start with 1319_TC1. Step 1 creates a copy of the entire source, but all files are 0 Bytes (no actual movement of data) robocopy myDest DeleteMe /E /MOVE /XD 1319_TC1.*.Robocopy mySrc myDest /S /IncludeFolders 1319_TC1.* This answer is adapted from the beautiful answer by John at: It also supports copying only files and folders which are already mirrored in the target directory, so you can combine both together to implement a flexible solution to include only folders with a specific pattern. Robocopy specifically does not support inclusion patterns, but it does support exclusion patterns. Gci C:\results\1319_TC1.* | foreach-object
