> > \filepath{c:/docs/}
>
> Have you tried it with Windows-style path names?
So I changed this to define a \dirsep macro which gives me a backslash.
Using \textbackslash (and I think escaping the backslash) seemed to insert a
\T1 macro that is undefined.
However, with my \dirsep, I still get the same error. I've tried this with
a very basic document using pdflatex under unix, and I got the same problem,
albeit with a different outcome:
(./test.aux)
[1{/usr/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]pdflatex: Not
writing to <path>/testreq1.tex (openout_any = p).
! I can't write on file `<path>/testreq1.tex'.
<to be read again>
\immediate
l.26 \reqbody{Put some text in the file}
Please type another output file name:
(<path>/testreq1.tex) [1] (./test.aux) )</usr/share/texmf/fo
nts/type1/bluesky/cm/cmmi12.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmbx12
.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmr12.pfb></usr/share/texmf/fonts
/type1/bluesky/cm/cmr17.pfb>
Output written on test.pdf (2 pages, 20839 bytes).
Transcript written on test.log.
So at the 'Please type another output file name:' prompt I just hit enter,
and the write to the original filename was successful. So this appears to
be a security thing; latex is preventing a write to arbitrary files. But
just confirming at the prompt that you want to write that file is enough?
So in my Unix setup I set the TEXMFOUTPUT environment variable to <path>,
and the write now seems to go ahead without any complaint, and without
presenting a prompt for a new filename.
I've tried the same under Windows (I need this to work with LyX under
Windows), setting an environment variable to point to a path (and
reconfiguring and restarting LyX just in case), and specifying that path as
my \filepath, but I still get the same 'I can't write on file
`<path>/testreq1.tex' error.
Any thoughts?
Many thanks,
Steve