Created
May 31, 2023 21:17
-
-
Save Edwardtonnn/1341da79d29c71931512b249c4c6b687 to your computer and use it in GitHub Desktop.
Bulk folder increment
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
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