Created
April 15, 2026 01:16
-
-
Save hoganlong/cec53304fcb9f4542f800265c5d40f51 to your computer and use it in GitHub Desktop.
PowerShell Rename files on aws bucket
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
| $bucket = "s3://keithlong-art-photos/scans/" | |
| aws s3 ls $bucket | ForEach-Object { | |
| $file = ($_ -split '\s+')[-1] | |
| if ($file -match '^KLA_Sketchbooks_(.+)$') { | |
| $newfile = "KLA_$($Matches[1])" | |
| Write-Host "$file -> $newfile" | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment