Search found 4 matches

by paul_costas
06 Aug 2010 17:59
Forum: DOS Batch Forum
Topic: help - replace multiple strings from a file in another file
Replies: 11
Views: 19878

Re: help - replace multiple strings from a file in another f

You can't use asterisks. This is one of the special characters (wildcards) in batch. Here I attached a small VBScript. Save the code as Xchange.vbs. Call it from your batch file: @echo off &setlocal for /f "usebackq tokens=1* delims= " %%a in ("string.txt") do ( call Xchange...
by paul_costas
05 Aug 2010 16:25
Forum: DOS Batch Forum
Topic: help - replace multiple strings from a file in another file
Replies: 11
Views: 19878

Re: help - replace multiple strings from a file in another f

Probably this can be done using native batch, but it's slow! If you have big files it will run a very long time. I tried: string.txt Daniel Christiansen Paul Tom Dana Christine source.txt <Daniel said:> "I saw Paul today. He asked for you, Dana." Replace.bat @echo off &setlocal :proce...
by paul_costas
05 Aug 2010 15:10
Forum: DOS Batch Forum
Topic: help - replace multiple strings from a file in another file
Replies: 11
Views: 19878

Re: help - replace multiple strings from a file in another f

# Script ReplaceWords.txt var string list, line, word1, word2, content cat "C:/test/destin.txt" > $content ; cat "C:/test/string.txt" > $list lex "1" $list > $line while ($line <> "") do wex "1" $line > $word1 ; wex "1" $line > $word2 echo...
by paul_costas
05 Aug 2010 11:52
Forum: DOS Batch Forum
Topic: help - replace multiple strings from a file in another file
Replies: 11
Views: 19878

help - replace multiple strings from a file in another file

Hello there the issue is find and replace multiple strings from a file, into another file like this string.txt contains : Daniel Christiansen Paul Tom Dana Christine and so on... destin.txt contain large text files, stories for kids what i want is to replace every letter or word from string.txt with...