md Input
Md Export
md Collection

if not exist exclusion_list.txt type nul > exclusion_list.txt
@echo off
setlocal enabledelayedexpansion

set "InputFolder=Input"
set "OutputFolder=Export"

if not exist "!OutputFolder!" mkdir "!OutputFolder!"

for %%F in ("!InputFolder!\*.*") do (
  set "FileName=%%~NF"
  set "OutputFile=!OutputFolder!\!FileName!.html"
  pandoc "%%F" -s -o "!OutputFile!"
)

echo Conversion complete!
set I=Input
set C=Collection
set E=Export

copy %I% %C% 
copy %E% %C% 


cd Collection
echo cd.. > Input.bat
echo cd Input >> Input.bat
echo set X=^%%cd^%% >> Input.bat
echo cd.. >> Input.bat
echo cd Collection >> Input.bat
echo copy *.md ^%%X^%% >> Input.bat
echo cd >> Input.bat
cd..


del  9999-A.7z /s /q
del  9999.7z /s /q
del  Collection.7z /s /q
7zr.exe a -r -y 9999-A.7z * 
7zr.exe a -r -y 9999.7z * -xr@exclusion_list.txt

7zr.exe a -r -y Collection.7z Collection




















