Created
November 7, 2019 09:43
-
-
Save alst74/53dacca98c3a6ac2a2483aadfe6ebe54 to your computer and use it in GitHub Desktop.
Move files recursivly with Powershell
This file contains hidden or 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
$SRC = "c:\temp" | |
$FILES = "*.mp4", "*.jpg" | |
$DST = "c:\destfolder" | |
for ($i=0; $i -lt $FILES.length; $i++) { | |
Get-ChildItem -Recurse -Path "$SRC\$FILES[$i]" | Move-Item -Destination $DST -WhatIf | |
# Write-Host("File: ") $FILES[$i] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment