2

How to delete a file in latex code with normal complie tex. I create temporary files and when i finish using them I want to delete them. It not delete by bash or editor. Thankyou!

Torbjørn T.
  • 206,688
StackUser
  • 195

1 Answers1

4

You could use the cool latex automation tool arara to automatically delete the text file after the compilation is finished:

% !TeX program = txs:///arara
% arara: pdflatex
% arara: clean: { files: [ foo.txt ] }

\documentclass{article}

\begin{document}
content...
\end{document}