Last active
April 24, 2024 04:23
-
-
Save jcefoli/b77e7f2e8d5bfd005c55 to your computer and use it in GitHub Desktop.
Powershell: Move Files & Folders In Directory Recursively to Another Directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Recursively move all files in C:\SourceDir into C:\Destination | |
Assumes C:\Destination exists already, or there could be problems | |
#> | |
Move-Item -Path "C:\SourceDir\*" -Destination "C:\Destination" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was an awesome find! Simplicity at it's finest.
Get-ChildItem 'dot-slash *.(file extension)' -Recurse | Move-Item -Destination 'dot-slash'
I just... I mean I... Thanks you. It was so simple I completely missed it.