2
4
Currently I'm using cmdlets like:
dir | rename-item -NewName {$_.name -replace "-","_"}
But now I need to add a prefix to the filename for all files in the directory.
I can't predict how long each filename is (it varies), so I can't just use a bunch of .
wildcards.
I need it to append a fixed phrase to the beginning of each filename, regardless what that filename is.
1
See solution here http://stackoverflow.com/a/20874916/5518385
– Yisroel Tech – 2017-05-07T22:53:02.6571What is it now? A prefix or a suffix? For a prefix you already got a name so (literally) just add to your prefix or (for a suffix) just add the suffix to it. – Seth – 2017-05-08T12:09:23.703