Search found 3 matches

by batchrookie_99
30 Dec 2014 19:29
Forum: DOS Batch Forum
Topic: Replace content of txt
Replies: 4
Views: 1903

Re: Replace content of txt

I just found I can use

for %%a in (*.txt) do call jrepl "HelloWorld" "HelloFamily" /L /F "%%a" /O > result.txt

I have no problem now, :D :D
by batchrookie_99
30 Dec 2014 19:24
Forum: DOS Batch Forum
Topic: Replace content of txt
Replies: 4
Views: 1903

Re: Replace content of txt

Hi Foxidrive Thanks for your help. I downloaded the bat file and tried it. It indeed changed the output result in command windows but I need the txt file content also be replaced. Sorry for my unclear information. For example, The content of abc.txt HelloWorld HelloFriend After executed XX.cmd The c...
by batchrookie_99
30 Dec 2014 00:39
Forum: DOS Batch Forum
Topic: Replace content of txt
Replies: 4
Views: 1903

Replace content of txt

Hi everyone, Just start learning batch command and can't figure out how to do this. My question : One folder has many .txt files and I want to replace their content. 001_Family.txt 002_Family.txt 003_Family.txt ... The content likes below: HelloWorld HelloFriends 123456 ... I want to change "Wo...