I am using ReadFile and Position to cut and paste parts of a file into another file.
I have been unable to find a way to stop the search at the end of the variable. The Position command wraps around to the beginning, rather than stopping at the end. I can find the end of the variable using the Length command, but the source file (Variable) contains several nested loops of data (It is straight ASCII) so it is difficult to establish an end point.
Is there an equivalent to ##EOF## for ReadFile?
End of variable created with ReadFile
Moderators: JRL, Dorian (MJT support)
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
Why not add your own marker using:
Let>EOF=~END~
ReadFile>filename,variable
Let>variable=%variable%%EOF%
Now you just wait until you find your EOF marker. You could of course use any character or combination of characters, preferably ones you know aren't in the file already.
Let>EOF=~END~
ReadFile>filename,variable
Let>variable=%variable%%EOF%
Now you just wait until you find your EOF marker. You could of course use any character or combination of characters, preferably ones you know aren't in the file already.
MJT Net Support
[email protected]
[email protected]
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada