Files
Powershell-Scripts/Utility Scripts/Find and Replace File Names.ps1
T

4 lines
345 B
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Set-Location -Path "\\192.168.X.X\File Share\Pictures & Videos\2016\9-September\Kitchen Remodel"
Get-ChildItem | Rename-Item NewName { $_.name replace 'FILE NAME SEARCHING FOR','FILE NAME TO REPLACE' }
#Line removes double spaces and replaces with a single space
Get-ChildItem | Rename-Item NewName { $_.name replace ' ',' ' }