[pdftex] writing to ../ files

Will Robertson wspr81 at gmail.com
Tue Aug 19 03:14:13 CEST 2008


Hello,

Is there any way that I can get something like this to work? (I was  
hoping for an -insecure-write command line switch, but I didn't see  
one.)

%% small/small.tex %%
\documentclass{article}
\begin{document}
\newwrite\ww
\immediate\openout\ww=../small2/hello.txt\relax % ../small2/ already  
exists
\immediate\write\ww{hello}
\immediate\closeout\ww
\end{document}

I tried executing pdflatex from the parent directory:

pdflatex small/small.tex

which works, but I'd prefer

pdflatex -output-directory=small small/small.tex

which *doesn't*. Should it? (From a security perspective, I don't see  
why not.)

I'm using pdfTeX 3.1415926-1.40.9-2.2 (Web2C 7.5.7) in a beta version  
of MacTeX 2008.

Many thanks,
Will


More information about the pdftex mailing list