I needed to go through every file in a folder and all of its sub directories and open each file and replace a given string. This is what I finally came up with. I'm sure that this can be improved on though... function ReplaceText($fileInfo) { if( $_.GetType().Name -ne 'FileInfo') { # i.e. reject DirectoryInfo...
Continue reading "Powershell replace text in files and recurse subdirectories"