@echo off rem ** Get the plot file name and location from the command line. set INNAME=%1 rem ** Change the .plt (Change to .ps if you are using that extension) to .pdf for the output. set OUTNAME=%INNAME:.ps=.pdf% rem ** Delete any pdf files that exist with the same name del %OUTNAME% rem ** Change to the directory where Ghostscript is installed rem cd c:\gstools\gs5.50 rem ** Start Ghostscript, make sure that "C:\gstools\gs5.50" is set in your path. rem ** For NT this is setup in: Control Panel + System + Enviroment + path. rem call c:\gstools\gs5.50\ps2pdf %INNAME% %OUTNAME% call ps2pdf %INNAME% %OUTNAME% rem ** Change back to the pdf directory rem ** EDIT THE FOLLOWING PATH TO POINT TO YOUR PLOTS DIR rem cd D:\pro_files\plots\pdf rem ** Delete the original plot file. del %INNAME%