I don't know about a TeX only solution (I could however imagine that lualatex could by handy) but what I usually do is the following:
1) use a command like dir /b *.tex > allFiles.txt? to get a file of all the TeX files. (the /b suppresses everything but the file name)
2) open up Excel, paste the content of allFiles.txt and use string concatenation to build the include commands.
For once-only this is the most efficient solution. In cases where I regularly have to update my TeX file I'd write a short Python/Bash/Batch file.
EDIT:
I have found some suitable code to include via lualatex Lua-calls in one of the answers here and was able to adjust it a little. It uses \write18 as well, so it must be used with --shell-escape. I am pretty sure that a Lua-only solution is possible, but this is clearly beyond my Lua-knowledge.
%!TEX TS-program = LuaLaTeX
\documentclass[12pt,ngerman]{scrartcl}
\usepackage{luacode}
\begin{document}
Some text before the Lua call.
\begin{luacode}
function scandir(directory)
local i, t, popen = 0, {}, io.popen
for filename in popen('dir "'.. directory .. '" /b d*.tex'):lines() do
i = i + 1
t[i] = filename
tex.print('\\input{includes/' .. filename .. '} from ' .. filename ..'\\clearpage')
end
return t
end
scandir("C:/Users/Uwe/LuaLula/includes/")
\end{luacode}
\end{document}
dN, but that would be terribly slow.) How are the filenames generated, if they're generated? – Sean Allred Sep 13 '14 at 03:20yyyymmddbe better since that would at least order your files sensibly? – Seamus Sep 15 '14 at 10:59