Skip to content

Instantly share code, notes, and snippets.

Created November 21, 2016 16:00
Show Gist options
  • Save anonymous/93bc103de69a81c6d384b3be41c4afea to your computer and use it in GitHub Desktop.
Save anonymous/93bc103de69a81c6d384b3be41c4afea to your computer and use it in GitHub Desktop.
#OBTAINS LIST OF FOLDERS NEEDED FOR TRANSFER VIA FILTERS AND FILDE DEPTH
$test1=Get-ChildItem "c:\users\USER1\desktop\test\folder1" -recurse -depth 4 | Where-Object {$_.name -like "*``, *`` *``(*2016)"}| Select-Object -ExpandProperty FullName
#NEW DIRECTORY
$test2=”c:\users\USER1\desktop\test\folder2”
#DOES NOT WORK WITH THIS.
robocopy $test1 $test2 /xo /e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment