Ghostscript Batch file - execute and quit - gswin32c


Hi there i'm trying execute GhostScript on batch file

Problem is when first line is executed, it opens GhostScript window. i have to manually type quit or close the window to return the control to parent to execute the next command in batch.

To avoid Ghostscript opening a window, don't use gswin32.exe.
Use gswin32c.exe instead. (The c in the name is to indicate it's for console only...)

and this is the script

gswin32c -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOUTPUTFILE=pdfresult.pdf pdf1.pdf pdf2.pdf pdf3.pdf

https://stackoverflow.com/questions/14859490/ghostscript-gswin32c-hangs-but-gswin32-works