Skip to content

Instantly share code, notes, and snippets.

@Edwardtonnn
Created May 31, 2023 21:17
Show Gist options
  • Save Edwardtonnn/1341da79d29c71931512b249c4c6b687 to your computer and use it in GitHub Desktop.
Save Edwardtonnn/1341da79d29c71931512b249c4c6b687 to your computer and use it in GitHub Desktop.
Bulk folder increment
cd 'C:\path\to\your\directory'
Get-ChildItem -Directory | Sort-Object Name -Descending | ForEach-Object {
$newName = "{0:D2}" -f ([int]$_.Name + 1)
Rename-Item -Path $_.FullName -NewName $newName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment