@echo off
setlocal enabledelayedexpansion

if exist Thema01 (
   cd Thema01
   call make.bat
   cd ..
) else (
   @echo !time!: Konnte das Verzeichnis Uebungen nicht finden
)

del *.pdf OR *.png > nul
for %%f in (*.tex) do (
   @echo !time!: %cd%\%%f
   pdflatex -quiet "%%f"
   pdflatex -quiet "%%f" )

del *.aux OR *.bbl OR *.bcf OR *.blg OR *.gnuplot OR *.gz OR *.idx OR *.ilg OR *.ind OR *.log OR *.nav OR *.out OR *.snm OR *.toc OR *.vrb OR *.xml /s > nul