Announcement

Collapse
No announcement yet.

batch conversion only works interactive / crashes on error using command_line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Solved batch conversion only works interactive / crashes on error using command_line

    i would like to resize and copy about 10000 images, but some of them may contain invalid data and cannot be converted.

    when using the interactive batch conversion, the error message is just written to the log window and all the valid files are converted.

    but when using command line, i get a popup with the error message and the batch conversion is aborted.
    using /silent seems not to help, as it just aborts without a message then.

    how can i get the command_line version to go on after an error?

    my commandline is:

    "C:\Program Files\IrfanView\i_view32.exe" E:\temp_source\*.* /resize_long=500 /resize_short=350 /aspectratio /jpgq=50 /silent /convert=d:\dest\*.jpg


    and there's a second question:
    in the interactive version, i can select to not enlarge pictures that are smaller than the resize value. how can this be selected in the command line version?

    thanx!

    btw: i use irfanview 4.10

    #2
    I think your problem is that the expression *.* is not valid in an Irfanview command line. It appears to me that with that expression Irfanview raises an error message when it encounters an invalid file type, as you said, and ignores the command completely when it encounters a valid one.

    You could do the iteration outside the Irfanview command. For example

    cd E:\temp_source
    for %A in (*.jpg *.png) do "C:\Program Files\IrfanView\i_view32.exe" %A /resize_long=500 /resize_short=350 /aspectratio /jpgq=50 /convert=d:\dest\%~nA.jpg

    does the conversion for jpg and png files - just include any other file types you want inside the brackets e.g *.gif *.tif ,etc.
    Don't forget that you have to double up on all the % symbols if you use them in a batch file rather than the Command prompt.

    If you want to use features from the Advanced batch dialog that are not available directly in a command line, just set up all the features you want in the Advanced dialog (and the jpg save options) and close Irfanview. Then include /advancedbatch in your command line instead of /resize_long=500 /resize_short=350 /aspectratio /jpgq=50 and run that.
    Last edited by Mij; 20.11.2011, 10:24 PM.

    Comment


      #3
      works like that - great!
      thanx a lot!

      Comment

      Working...
      X