Skip to content

Instantly share code, notes, and snippets.

@seantunwin
Last active August 20, 2019 18:51
Show Gist options
  • Save seantunwin/78706662d69f077c43462f0ce978e075 to your computer and use it in GitHub Desktop.
Save seantunwin/78706662d69f077c43462f0ce978e075 to your computer and use it in GitHub Desktop.
PowerShell: Rename dir files with parenthesis and content within
# Add -Recurse to do child directories
# Remove -WhatIf when satisfied with test run
Get-ChildItem | Rename-Item -NewName { $_.name -replace ' \(.*\)','' } -WhatIf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment