@echo off for %%I IN ("%REDMON_DOCNAME%") DO @set NAME=%%~nI set VERZEICHNIS=C:\ rem WINDOWS NT >>> set VERZEICHNIS=C:\winnt\profiles\%REDMON_USER%\Desktop C:\gs\gs8.51\bin\gswin32c @C:\gs\pdf.rsp -sOutputFile="%VERZEICHNIS%\%NAME%.pdf" -dBATCH -c save pop .setpdfwrite -f %1 > "%VERZEICHNIS%\%NAME%.log" findstr "Can't" "%VERZEICHNIS%\%NAME%.log" if %ERRORLEVEL% == 0 goto Warning findstr "Error" "%VERZEICHNIS%\%NAME%.log" if %ERRORLEVEL% == 0 goto NOTOK :OK del "%VERZEICHNIS%\%NAME%.log" :Acrobat start "Acrobat" "%VERZEICHNIS%\%NAME%.pdf" goto END :Warning start write "%VERZEICHNIS%\%NAME%.log" goto Acrobat :NOTOK start write "%VERZEICHNIS%\%NAME%.log" :END