I'm using an older version of robocopy that includes percentages in the log even if the /NJH and /NJS paramters are set. So I'd like to remove the percentages from the log:
72880735 H:\1.txt
100%
33038490 H:\10.txt
100%
64878348 H:\2.txt
100%
25875810 H:\3.txt
0%
100%
I've tried with
(Get-Content $logfile) | Where-Object {
$_ -match '[\s](\d{1,})(\s+)(\w\W\W.+)'
} | Set-Content $logfile
But that results in
72880735 H:\1.txt
33038490 H:\10.txt
64878348 H:\2.txt
25875810 H:\3.txt
0%
So I get the 100%'s stripped out, but not the 0%.