Batch Incremented File Rename Batch Incremented File Rename powershell powershell

Batch Incremented File Rename


This is a way:

$files = Get-ChildItem c:\yourpath\*.ext$id = 1$files | foreach {Rename-Item -Path $_.fullname -NewName (($id++).tostring() + $_.extension) }