# See if we need to remove brackets remove square brackets. Rename files. # $RenamePath = '\\Sqlprod7b\e$\MSSQL\SCRIPTS\master\StoredProcedureTFS' get-childitem $RenamePath | ForEach-Object { Move-Item -LiteralPath $_.Fullname $_.Fullname.Replace("[","").Replace("]","") -ErrorAction Stop }