Created
August 22, 2013 17:00
-
-
Save peaeater/6309960 to your computer and use it in GitHub Desktop.
Replace a portion of a filename in a list of filenames with regex.
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
ls * -name | ren -newname {$_ -replace '^(.*)-replaceme-(.*)$', '$1-newvalue-$2'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment