1

How can I replace "|PersonId|" with "PersonId(SourceSystemId)" in a data file by batch? There are several places need to be replaced.

Thanks,

DBALUKE HUANG
  • 247
  • 1
  • 10

1 Answers1

1

Try with replacer.bat

call replacer.bat "C:\data.file" "|PersonId|" "PersonId(SourceSystemId)"
npocmaka
  • 55,367
  • 18
  • 148
  • 187
  • Hi Npocmaka, Thank you for your info. I used this script. But it replaced all columns to PersonId(SourceSystemId)...Can you tell me which one I need modify? I used script https://github.com/npocmaka/batch.scripts/blob/master/hybrids/jscript/replacer.bat. Thanks, – DBALUKE HUANG Feb 13 '18 at 19:24
  • @DBALUKEHUANG - so there places where it should not be replaced? You didn't specified this in your question.I still don't know how I can help without knowing when and when not it should be replaced. – npocmaka Feb 13 '18 at 19:56
  • Thank you for your help. I figured it out with https://www.dostips.com/?t=batch.findandreplace. The script works for me. Much appreciate and best regards, – DBALUKE HUANG Feb 13 '18 at 20:42