I need help removing double quotes in the content of all the files in a directory. I can get it done one file at a time and its fast too not sure how to do it for all files without impacting performance. There are more than 600 files in the directory.
PS script for one file:
(gc C:\Temp\data.txt -En UTF8) | ForEach-Object {$_ -replace '"',''} | Out-File C:\Temp\data.txt -En UTF8
Trying with all the files in a folder using code below. But, its been too slow.
PS script for all files:
Get-ChildItem "C:\Temp" -Filter *.txt |
Foreach-Object {
$content = Get-Content $_.FullName
#filter and replace content to the original file
$content | % {$_ -replace '"', ''}
#save content to the same file name
$content | Out-File $File.BaseName -En UTF8
}