rem 2019.6.7
rem
rem  merge all .pdf files in current directory, write the output (named mergePDF.pdf) to g:\xtemp
rem
rem  if your directory is c:\xtemp, then change the following accordingly

del g:\xtemp\merged.pdf
dir /B /OD *.pdf >> files.txt
mgs.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -sOutputFile=g:\xtemp\merged.pdf @files.txt
del files.txt
