Skip to content

Instantly share code, notes, and snippets.

@victorgabrielbs
Created July 18, 2023 14:10
Show Gist options
  • Save victorgabrielbs/7f2d3c21b2dca2d9d665131832e431d0 to your computer and use it in GitHub Desktop.
Save victorgabrielbs/7f2d3c21b2dca2d9d665131832e431d0 to your computer and use it in GitHub Desktop.
$destino = "$env:USERPROFILE\Pictures\Wallpapers"
if (-not (Test-Path $destino)) {
New-Item -ItemType Directory -Path $destino | Out-Null
}
$arquivos = Get-ChildItem -Path $PWD -File -Recurse | Where-Object { $_.Extension -match "png|jpg" }
foreach ($arquivo in $arquivos) {
Move-Item -Path $arquivo.FullName -Destination $destino -Force
}
Write-Host "Concluído! Os arquivos foram movidos para $destino."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment