[Tex/LaTex] Include/input every subfile from a subfolder

includeinputmodules

Our chemistry teacher gave us a collection of vocabulary cards which include every term we should be able to explain (looking forward for the final exams). Because just having those cards doesn't help a friend and I would like to create a glossary. At the moment the collections consists of about 180 terms. Considering the size of the final document we decided to go with LaTeX and to divide this project into single files so we could work on different terms very easily. The initial setup for the project looks like this:

Basic setup

Every term should get a single file in the entries subfolder. Is it possible to input all files with a single command into the main file? Is there something like \input{entries/*}?

EDIT:

The files should have the name of the term the explain. Therefore the files won't be numbered and have entirely different names.

Best Answer

If the files are numbered sequentially then you could use the pgffor package to insert them with a loop:

\documentclass{article}
\usepackage{pgffor}
\begin{document}
\foreach \x in {1,...,10}{
  \input{file\x}
}
\end{document}

This will input file1 to file10 into your document.

If the files have arbitrary names, you could still use a loop, but then each name would need to be specified in the \foreach command, e.g. \foreach \x in {worda,wordb,wordc} etc.

This answers your actual question, but there may be other solutions to the larger problem you are trying to solve, i.e., making a glossary. I would be more inclined to keep the entries in a spreadsheet and then use datatool to create the glossary, for example.