1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
$ruta = "E:\aleman\" $file = $ruta+".\dplus_1.rtf" $rtf = New-Object System.Windows.Forms.RichTextBox $rtf.Rtf = [System.IO.File]::ReadAllText($file) $rtf.Text | Out-File $file.replace(".rtf",".txt") foreach($linea in gc $file.replace(".rtf",".txt")) { if($linea | Select-String ":") { Write-Host $linea '' -BackgroundColor Cyan -ForegroundColor Blue -NoNewline } else { Write-Host " " } } |
