Skip to content

Instantly share code, notes, and snippets.

@atxryan
Created May 6, 2017 19:09
Show Gist options
  • Save atxryan/948cc126730ecb5e4529ed3205ea5d15 to your computer and use it in GitHub Desktop.
Save atxryan/948cc126730ecb5e4529ed3205ea5d15 to your computer and use it in GitHub Desktop.
Rename files in directory with incrementing number
Get-ChildItem |
% -Begin { $i = 1 } -Process {
Rename-Item -LiteralPath $_.FullName -NewName ("bonefrog_{0:D3}.jpg" -f $i++)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment