(just now realized that this solution does not utilize command-line input as poster specified)

Another solution is to create a tex file that uses the \input command to input just the files for a particular version. So, for example, you could create a file called ver1files.tex , which would consist of these lines:

\input{./ver1file1.tex} \input{./ver1file2.tex} \input{./ver1file3.tex} ... \input{./ver1file100.tex}

Then, in your main LaTeX document, you can easily input all of your ver1 files simply by inputting your ver1files.tex file, like so:

\input{./ver1files.tex}

You can create a ver2files.tex that contains \input commands for all the ver2 files, and so on and so forth for all your versions.

Note that LaTeX allows you to "nest" \input commands like this. That is to say, you have an \input in your main LaTeX file that inputs a file that contains additional \input commands. That's fine to do with \input . However, you cannot utilize this type of nesting with the \include command.