0

In powershell I want to rename a bunch of files with from test_file_DAY.csv to test_file_hello_DAY.vsn

all the files have _DAY.csv in them. What would be the script to do this? they would be in one folder with subfolders.

Thanks

Not sure how to do this.

mklement0
  • 382,024
  • 64
  • 607
  • 775
  • In short: The idiom for renaming files based on transforming the existing names via string replacements is `Get-ChildItem ... | Rename-Item -NewName { $_.Name -replace 'foo', 'bar' }`. See the linked duplicate for details. – mklement0 Aug 25 '23 at 15:44

0 Answers0