Skip to content

Instantly share code, notes, and snippets.

@flagranterror
Created November 1, 2019 13:30
Show Gist options
  • Save flagranterror/9c68400607f223c938892eee4da9696e to your computer and use it in GitHub Desktop.
Save flagranterror/9c68400607f223c938892eee4da9696e to your computer and use it in GitHub Desktop.
Batch rename files from CSV manifest
$batchList = Import-Csv changes.csv -Header "OldName","NewName"
$batchList | foreach {
$oldName = $_.OldName
$newName = $_.NewName
Write-Host "Renaming $oldName to $newName"
Rename-Item $oldName $newName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment