You could switch to luatex then append from Lua.

Failing that, more efficient than repeatedly reading and copying in tex
way would be to not append but write a new file each time  file-1.x
file-2.x ... then  concat them in your operating system concat in a nix
shell,  or copy*.x > realfile.txt  in windows (I think)

David


On Sun, 21 Jul 2024 at 14:12, Philip Taylor (RHBNC) via XeTeX <xetex@tug.org>
wrote:

> I am 99.999% certain that the answer is "no", but I still *hope* that the
> answer might be "yes" — is it possible to use \immediate \openout and
> \immediate \write in such a way as to *append* to an existing file rather
> than overwriting it ?  If not, is there a more efficient way of achieving
> this than opening the existing file for reading, copying it to a temporary
> file, closing both, re-opening the temporary file for reading, re-opening
> the existing file for writing, copying the former to the latter, and then
> and only then performing the desired \writes ?
> --
> *Philip Taylor*
>
> This email, its contents and any attachments are intended solely for the
> addressee and may contain confidential information. In certain
> circumstances, it may also be subject to legal privilege. Any unauthorised
> use, disclosure, or copying is not permitted. If you have received this
> email in error, please notify us and immediately and permanently delete it.
> Any views or opinions expressed in personal emails are solely those of the
> author and do not necessarily represent those of Royal Holloway, University
> of London. It is your responsibility to ensure that this email and any
> attachments are virus free.
>
>

Reply via email to