Created
July 18, 2023 14:10
-
-
Save victorgabrielbs/7f2d3c21b2dca2d9d665131832e431d0 to your computer and use it in GitHub Desktop.
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
$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