i have a need to replace different string in file names. Is there a way to modify a file name using a find replace function in Powershell?
I have done this in a .bat file but would for this to be done in PS instead.
i have a need to replace different string in file names. Is there a way to modify a file name using a find replace function in Powershell?
I have done this in a .bat file but would for this to be done in PS instead.
You didn't provide any details so here's a generic example:
Note that
$pattern
will be treated as a regular expression so escape special characters if you need to catch them.