Wenn ich dieses Skript ausführe, öffnet sich IrvanView.
Wenn ich "/convert=$D$F_$Wx$H.$O" anhänge, gibt es folgenden Fehler:
Was kann ich tun?
Code:
@echo on cls setlocal enabledelayedexpansion :: --- Konfiguration ---> :: Pfadangabe zu IrfanView set iview=C:\Program Files (x86)\IrfanView\i_view32.exe :: Bildinfo-Datei set nfofile=info.txt :: <--- Konfiguration --- ::echo AAAAAAAAAAAAAAAAAAAAAAAAAAAA if "%~1"=="" ( echo LEER echo Abbruch^^! echo Fehlender Parameter. ) else ( echo NICHT LEER echo Bildname: "%~nx1" "%iview%" "%~1" /info="%TMP%\%nfofile%" for /f "tokens=4,6 delims= " %%a in ('find "dimensions" "%TMP%\%nfofile%"') do ( set width=%%a set height=%%b ) echo Bildbreite: !width! Pixel echo Bildhöhe: !height! Pixel set /a width = !width! / 14 * 10 echo Bildbreite: !width! Pixel REM resize "%iview%" "%~1" /resize=(!width!,!height!) /convert="$D$F_$Wx$H.$O" ) if exist "%TMP%\%nfofile%" del "%TMP%\%nfofile%" echo. echo. endlocal
Code:
C:\Windows Batch>setlocal enabledelayedexpansion C:\Windows Batch>set iview=C:\Program Files (x86)\IrfanView\i_view32.exe C:\Windows Batch>set nfofile=info.txt "/convert" kann syntaktisch an dieser Stelle nicht verarbeitet werden. C:\Windows Batch> "C:\Program Files (x86)\IrfanView\i_view32.exe" "tele 5 hd.jpg" /resize=(!width!,!height!) /convert=$D$F_$Wx$H.$O C:\Windows Batch>
Comment