Created
December 22, 2019 03:17
-
-
Save Fireforge/a45d7ab0f21b982b099f28216b179d86 to your computer and use it in GitHub Desktop.
Powershell batch find-replace in file names
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
# Replace the sub-string "foo" with "bar" in a bunch of files with different file names: | |
ls | %{ $new = $_ -replace "foo", "bar"; echo $new; mv $_ $new } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment