0
0
Consider the files:
File1 (Custom).jpg
File2(Custom).jpg
I need to rename the files to strip away" (Custom)" and/or "(Custom)" from their Name string (notice the space before the opening parenthesis).
Doing one is easy enough using Rename-Item -NewName {$_.name -replace " \(Custom\)", ""}
, but I'd like to do both (and possibly additional string patterns)
I'm having a hard time asking Google the right question, it would seem..
Look for regular expressions or consider using an easier scheme like taking the first N characters. – Seth – 2017-10-27T08:25:46.500