Find & Replace text strings

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kdI16
Posts: 1
Joined: 10 Dec 2018 12:07

Find & Replace text strings

#1 Post by kdI16 » 10 Dec 2018 12:17

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!

penpen
Expert
Posts: 1991
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Find & Replace text strings

#2 Post by penpen » 16 Dec 2018 04:55

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 ! % ^ & | ...).

penpen

Post Reply