@echo off rem ** Get the plot file name and location from the command line. set INNAME=%1 set date_time=%date%_%time% SET date_time=%date_time:/=% SET date_time=%date_time: =% SET date_time=%date_time:Thu=% SET date_time=%date_time:Fri=% SET date_time=%date_time:Sat=% SET date_time=%date_time:Sun=% SET date_time=%date_time:Mon=% SET date_time=%date_time:Tue=% SET date_time=%date_time:Wed=% SET date_time=%date_time::=% SET date_time=%date_time:.=% set OUTNAME=%INNAME:.plt=%_%date_time%.pdf set OUTNAME=%INNAME:.plt=.pdf% rem ** Change the .plt (Change to .ps if you are using that extension) to .pdf for the output. rem set OUTNAME=%INNAME1:.plt=.pdf% rem ** Change to the directory where Ghostscript is installed cd /D Q:\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 c:\pdf cd /D Q:\PDF_Shared rem ** Delete the original plot file. del %INNAME% rem start %OUTNAME%