3

What I'm trying to do is input file1 if it exists and input file2 otherwise, without having to deal with an 'I can't find file' error. I would like to accomplish this using TeX, without using symbolic links. What I would like is some kind of \try command:

\try{\input{file1}}
\catch{\input{file2}}

Of course, this would try to input file1 and, if it encounters an error, input file2 instead.

I'm sure people who are more proficient than I am with plain TeX could accomplish this easily.

(Please feel free to edit the tags.)

lockstep
  • 250,273
Z Norwood
  • 817

0 Answers0