Writing from one text file to another
Hi
I have to read the contents of a one-liner text file (for example ID=099) to another text file, but within a container (for example VALUE="ID=099"
I'd appreciate any help with this problem.
Software
Hi
I have to read the contents of a one-liner text file (for example ID=099) to another text file, but within a container (for example VALUE="ID=099"
I'd appreciate any help with this problem.
by zzoran1 Accepted solution
by tony hopkinson Accepted solution
Windows, Linux ?
What is triggering the read ?
This output file is it a one liner as well,
is VALUE="ID=099" all there is?
by zzoran1 Accepted solution
Hi
I apologise, I realize now I really should have provided more information.
This is in a Windows environment.
Basically, I have to automate the construction of an SMS mif file.
The basic file has the following layout:
ATTRIBUTE
NAME="blahblah"
ID=1
TYPE=String(250)
VALUE="ID=099"
END ATTRIBUTE
So far, I've just written a command file that parses some file, and creates the output in the one-liner text file, as explained in the first post. I now have to take those results, and create a second file that contains that result, but within the container. It doesn't matter how its done. I can write all the containers one line by one line if need be. The key is getting that data from the first text file into a variable, then getting the variable into the second text file, but obviously within the container. I hope this clears it up a bit :)
by tony hopkinson Accepted solution
@ECHO OFF
ECHO ATTRIBUTE
ECHO NAME="blahblah"
ECHO ID=1
ECHO TYPE=String(250)
ECHO VALUE="%~1"
ECHO END ATTRIBUTE
Stick this lot in a cmd file called makemif.cmd
then makemif "ID=99" > newmif.mif
Should give you a start.
by zzoran1 Accepted solution
This discussion is closed to new replies.
Sort by Trending