\documentclass{article}
\usepackage{listings,xcolor}
\usepackage[a4paper,margin=2cm]{geometry}
\lstset
{
language={[LaTeX]TeX},
frame=single,
breaklines=true,
basicstyle=\small\tt,
keywordstyle=\color{blue}\sf,
identifierstyle=\color{magenta},
commentstyle=\color{cyan},
backgroundcolor=\color{yellow!5}
}
\def\ImportAllSourceCodes
{%
\immediate\write18{cmd /c dir /b *.tex > \jobname-temp.txt}%
\newread\myfile
\openin\myfile=\jobname-temp.txt
\newcount\counter
\counter=0
\loop
\unless\ifeof\myfile
\read\myfile to\mydata
\advance \counter by 1
\repeat
\closein\myfile
\openin\myfile=\jobname-temp.txt
\advance \counter by -1
\loop
\ifnum \counter > 0
\read\myfile to\mydata
\section\mydata
\lstinputlisting{"\mydata"}\newpage
\advance \counter by -1
\repeat
\closein\myfile
}
\usepackage{hyperref}
\begin{document}
\ImportAllSourceCodes
\end{document}
TeX - LaTeX
Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems
Stack Overflow
Q&A for professional and enthusiast programmers
English Language & Usage
Q&A for linguists, etymologists, and serious English language enthusiasts
Physics
Q&A for active researchers, academics and students of physics
Mathematics
Q&A for people studying math at any level and professionals in related fields
Meta Stack Overflow
Q&A for meta-discussion of the Stack Exchange family of Q&A websites
Ask Different
Q&A for power users of Apple hardware and software
Programmers
Q&A for professional programmers interested in conceptual questions about software development
Area 51
Stack Exchange Network staging zone, where users come together to build new Q&A sites
Electrical Engineering
Q&A for electronics and electrical engineering professionals, students, and enthusiasts
Graphic Design
Q&A for professional graphic designers and non-designers trying to do their own graphic design
Server Fault
Q&A for professional system and network administrators
Personal Finance & Money
Q&A for people who want to be financially literate