NEWBIE: Replace string on file1 from string on file2

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
MrSep20
Posts: 1
Joined: 02 Dec 2022 05:33

NEWBIE: Replace string on file1 from string on file2

#1 Post by MrSep20 » 02 Dec 2022 05:41

I have 02 file Source.txt & Destination.txt

Destination.txt
------------------
Store = A1
Address = 123 A1
.....

Source.txt
------------------
Store = A2
Address = 456 A2

-----------
Now, I want to do a batch file check in Destination.txt with String="Store" if available and replace it with string "Store = A2" in Source.txt file. Similar to "Address".

After replace then
Destination.txt
-------
Store = A2
Address = 456 A2
....

Sorry for the limited English

Thanks

Post Reply