Currently our RTF contains { INCLUDETEXT "fileSign02.rtf" * MERGEFORMAT } want to replace it with { INCLUDETEXT "fileSign02.rtf" } is there anyway can be handled in batch for all RTF files
CodePudding user response:
You may need to add a filter to get-childitem depending on your requiements.
get-childitem c:\your_rtf_folder | %{(get-content $_.Fullname) -replace "\* MERGEFORMAT","" | set-content $_.Fullname}