|
Answer» Hi
I have a batch file abc.bat Need to SEARCH for a string in a particular file SAY xyz.txt for string "name" Assuming xyz.txt contained name , lets say the output LINE is -- My name is Matt
Then need to merge this line with existing line in abc.bat Lets say the existing line in abc.bat is -- My name is Paul
Result --- My name is Paul Matt
Need to do this with DOS commands . Any HELP is appreciated.Code: [Select]for /f "tokens=1-4" %%w in (xyz.txt) do ( for /f "tokens=1-4" %%a in (abc.txt) do ( echo %%a %%B %%c %%d %%z ) )
Quote Need to do this with DOS commands . Why?
Let me know later in the semester how we did.
|