I try to use a .txt data in many different folders, so I thought It is enough to put it in the parent folder and all my Latex data can access to it and can also increment the numbers in the .txt data which is in the parent folder. Unfortunately there is an error, which forbid me to change the .txt data in the parent folder. I don't know how to solve this problem.
I would be happy, If someone of you have a solution for my problem.
\newwrite\NoFile
\newread\NoFile
\newcounter{NoRe}
\openin\NoFile=/Users/.../Desktop/.../.../PF/NoFile.txt%
\read\NoFile to \fileline
\setcounter{NoRe}{\fileline}
\closein\NoFile
\stepcounter{NoRe}
\immediate\openout\NoFile=/Users/.../.../.../.../PF/NoFile.txt
\immediate\write\NoFile{\theNoRe}
\immediate\closeout\NoFile
open_out=any pdflatex myfile
– David Carlisle Jan 21 at 23:46