Skip to content

Instantly share code, notes, and snippets.

@leeeeeeeee2
Last active February 20, 2023 09:04
Show Gist options
  • Save leeeeeeeee2/8ad660d842c325c2f8d52591f7fd0f96 to your computer and use it in GitHub Desktop.
Save leeeeeeeee2/8ad660d842c325c2f8d52591f7fd0f96 to your computer and use it in GitHub Desktop.
Powser shell rename *.gz to *.tar.gz
# The GNU General Public License v3.0
Get-ChildItem -File -Filter '*.gz' |
ForEach-Object {
Move-Item -Path $_.FullName -Destination $($_.FullName -replace '^(.*)\.gz$', '$1.tar.gz')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment