Page 1 of 1

Find & Replace text strings

Posted: 10 Dec 2018 12:17
by kdI16
Hi all - giving this a shot with a fairly large change/deployment that needs to take place & looking for some guidance. I need to employ the use of Find & Replace with a file located in a static location across a large number of PC's so that I can change two strings of text within a .txt file instead of touching each device.

For purposes of asking here lets say the file is located in C:\ProgramData\Example\sometext.txt and within there would be two lines that need to be changed

Any help/guidance would be greatly appreciated - thank you!

Re: Find & Replace text strings

Posted: 16 Dec 2018 04:55
by penpen
You have described your task is much to vague, all one could say is you probably could use findstr, a "for /F" loop, or both, and be carefull when dealing with "poisonous characters" (== command token character like ! % ^ & | ...).