How to Replace a Text in PowerShell?

# Suppose you have a folder called SPs, under the folder, you have 1000 txt files, each with certain texts such as SET ANSI_NULL ON, you want to get rid of it.
PS C:\Users\Charlie\Documents\SPs> $i=1; $ct=(gci *.txt).count; gci *.txt | % {(Get-Content $_)| % {$_ -replace "SET ANSI_NULLS ON",""} | set-content $_; "$i of $ct"; $i=$i+1}
<# The screen will show the progress and the content will be properly placed. An example
1 of 1000
2 of 1000

....
#>