Skip to content

Instantly share code, notes, and snippets.

@alst74
Created November 7, 2019 09:43
Show Gist options
  • Save alst74/53dacca98c3a6ac2a2483aadfe6ebe54 to your computer and use it in GitHub Desktop.
Save alst74/53dacca98c3a6ac2a2483aadfe6ebe54 to your computer and use it in GitHub Desktop.
Move files recursivly with Powershell
$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