@echo off setlocal cd %~dp0 echo ^ > index.html echo ^ >> index.html echo ^ >> index.html echo ^tt.c^<^/title^> >> index.html echo ^ >> index.html echo ^ >> index.html for /f "tokens=*" %%f in ('dir /b/a-d ..\src') do ( echo ^%%f^ >> index.html awk -F """" "/^\/\// { sub(/^\/\/ */, """", $0); print gensub(/->[ ]*([^ ][^ ]*)$/, ""\\\\→\\\\ *\\\\1*"", $0); next } /^[ ]*$/ { print """"; next } { print "" "" $0 }" < ..\src\%%f | markdown.exe | sed -e "s/h2>/h3>/g" -e "s/h1>/h2>/g" >> index.html echo ^ >> index.html ) echo ^^ >> index.html