Possible Duplicate:
How to iterate through the name of files in a folder
Using \input{filename}
, I can input a file canned "filename.tex". I have a directory containing all of the files I want to include. How can I create a for loop, which inputs all of those files?
- The contents of the directory sometimes changes (so I do not want to manually specify all of the files).
- The files are numbered (e.g.
file01.tex
,file02.tex
), so the loop should have no difficulty inputing them in the correct order. - Other code will be placed within the for loop (before and after the
input
command), so I do not want to simply list all of the files at once (e.g.\input{file01,file02}
).