Announcement

Collapse
No announcement yet.

Commandline Option Error

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

    Commandline Option Error

    I always like to automate things and Irfanview is a great help for that when doing something with photos and puctures. Today I stumbled against some minor glitch when automatically converting a BMP picture to JPG with the following commandline in a batchfile:

    i_view.exe c:\path\picture.bmp /convert=$D$N.JPG /jpgq=100

    Irfanview then popups a messagebox with the following message:

    Can't open file for writing: "c_\path\picture.jpg"

    Somehow c: became c_

    Workaround for now is:

    i_view.exe c:\path\picture.bmp /convert=c:\path\$N.JPG /jpgq=100

    I use:
    Irfanview version: 4.20
    Windows XP home SP3

    regards,
    Flintstone

    #2
    This probably should work, but it appears it does not. In Help it does say to Write always the FULL paths for file names (incl. drive). So maybe you do have to be explicit here. It would be nice if you didn't have to though. Maybe it is an oversight.

    BTW, if you are using /jpgq=100 for the conversion, it should come before /convert= so it is preset beforehand. If you are just setting it for afterwards, then it is fine where it is.

    Comment


      #3
      Thanks for the reply Skippybox.

      I think that you are right about the place of the /jpgq=100 parameter. In all the examples in the helpfile conversion parameters come before the output filenames.

      But after the /convert= commandline option it is said to: see Pattern page for additional filename options. So it seems to me that the destination path and filename could be extracted from the source path and filename. The $N does work anyway

      Flint.

      Comment


        #4
        Hi Flint!

        Originally posted by Flintstone View Post
        I think that you are right about the place of the /jpgq=100 parameter. In all the examples in the helpfile conversion parameters come before the output filenames.
        I decided to try it after and it doesn't make a difference after all! Stranger yet, if you put two different /jpgq's in, one before and one after, only the one before is used for the conversion and also retained in the ini. The one after is simply disregarded. Apparently, the command line is parsed and cleaned for smooth operation.
        But after the /convert= commandline option it is said to: see Pattern page for additional filename options. So it seems to me that the destination path and filename could be extracted from the source path and filename. The $N does work anyway
        That may be the problem. Just about every pattern works because they have no strange invalid characters like : or \ in them. While your context seems appropriate for $D, another would not, like in a name. Somehow IrfanView is storing the : as a _ for some reason, but either doesn't convert it back or simply does not expect it to be used in that way. It definitely seems like a bug, but there is no way to really know.

        Comment


          #5
          It is impossible to use a full pathname as a filename without making some character substitutions. Apparently IrfanView goes partway by changing the : to _, but it leaves the \ in and Windwoes will not allow a file to have it in its name -- that is a Forbidden Character.

          FYI -- from http://www.pctoptips.co.uk/toptips/tt04ifles.html

          The characters that you are not allowed to use in folder or filenames are: \ / : * ? " < > |, and if you try Windows will bleep at you.

          The following is a list of names that you are not allowed to use: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. This time it will let you enter the name but as soon as you press Return it will revert to its former name.
          So the $D is not useful for naming, only for adding the pathname to a contact sheet or such. Not quite a bug, but it either needs a little qualification/explanation in the Help file, or an adjustment to the naming feature
          Its: Belongs to "It"
          It's: Shortened form of "It is"
          ---------------------
          Lose: Fail to keep
          Loose: Not tight

          ---------------------
          Plurals do not require apostrophes

          Comment

          Working...
          X