|
Answer» I have been trying to find a way to read a STRING from a data file, then copy this to the end of a string in a different file. I have tried the copy command (a1.txt+data.dat comb.bat>nul) and it seems to copy the data to the next LINE and not to the end of the line.
For example I would LIKE to copy the string "123456" from file data.dat and append it to the line " /a /b g:" and make this a batch file that can be executed. The resulting bacth line would look like " /a /b g:123456" in the batch file.
mjedski The next will work if there isn't any special characters in the command (like < or |)
Code: [Select]for /f "TOKENS=*" %%c in (a1.txt) do set command=%%c for /f "tokens=*" %%d in (data.dat) do echo %command%%%d > comb.bat
|