Announcement

Collapse
No announcement yet.

Batch renaming and resizing via command line

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

    Batch renaming and resizing via command line

    Hi,

    Just wondering if someone could help with settting up a batch rename and resize that I need to do.

    The files are in one folder and export to another folder.
    The start as product-1000-imagenumber.tif and need to export to product-500-imagenumber.jpg.
    I currently sharpen by 1 in the batch.
    There are 6 imagenumber parameters (different images for the same product).

    Not sure if this is possible by batch.

    I have read a few posts about this and haven't found an answer. As a future suggestion being able to run a batch (including all parameters being saved) would make the program so so easy to use for non-programmers like myself.

    Thanking you in advance,

    Nathan...
    Last edited by Laurent; 24.05.2008, 09:12 PM. Reason: Commercial link in signature

    #2
    Hi Nathan,

    I hardly understand what you are looking for.

    About command line to resize, rename, look in IrfanView help file. There are many examples.

    Laurent
    Before you post ... fill in your OS and IV version in your profile.

    Comment


      #3
      Thanks for replying. I can do everything in command line except can't figure out how to do the renaming like in the gui batch as we label all our products with productcode-1000-1.tif, -1000-2.tif, etc. and resize them the new file has to be named productcode-250-1.jpg, productcode-250-2.jpg, etc.

      Hope this is a little clearer. Thanks so much.

      Nathan...

      Comment


        #4
        Hi Nathan,

        Did you try to use wildcards? (See help file for examples).

        Laurent
        Before you post ... fill in your OS and IV version in your profile.

        Comment


          #5
          Hi,

          On a similar note:

          I have thousands of images to convert and rename. The original is 257x193 pixels and I must save a bigger version of 400x300. The quality is badly affected by this and I thought of trying to sharpen up the images in the process to remove some of the fuzziness caused by stretching the image to a larger size.

          Here is my command (for a single file):

          i_view32.exe C:\a.jpg /resize=(400,300) /resample /jpgq=100 /convert=C:\b.jpg /sharpen=20

          But the sharpening doesn't do anything... I noticed in the help file that the sharpen example is used by itself (and actually opens up an instance of IrfanView) -- does this mean that sharpening cannot be applied through the command line? If so, are there any other alternative to sharpening up a fuzzy resized image (using command line parameters)?



          Thank you very much and thanks a lot for an amazing product.


          Alain

          Comment


            #6
            Try starting a batch operation with the selected files from the Thumbnail view or try the /advancedbatch switch from the command line.
            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

            Comment


              #7
              Hi Alain,

              Save after sharpening (/sharpen before /convert).

              Laurent
              Before you post ... fill in your OS and IV version in your profile.

              Comment


                #8
                I thought my situation would be a little easier, but I can't get the rename part to work. The command line I am using is

                i_view32.exe C:\test\*.jpg /resize=(65,65) /aspectratio /resample /convert=c:\test\*_thm.jpg

                The problem is that it doesn't add the "_thm", it overwrites the source file.

                Comment


                  #9
                  Syntax

                  Yes, your situation is easy, but I think the wildcard (*) is throwing it off. Read Text/Pattern Options in Help, but be careful. I would use:

                  i_view32.exe C:\test\*.jpg /resize=(65,65) /aspectratio /resample /convert=c:\test\$N_thm.jpg

                  And if you want to do a folder of mixed formats, try:

                  i_view32.exe C:\test\* /resize=(65,65) /aspectratio /resample /convert=c:\test\$N_thm.jpg

                  But, if you want to preserve their original formats, use:

                  i_view32.exe C:\test\* /resize=(65,65) /aspectratio /resample /convert=c:\test\$N_thm$O


                  Enjoy!

                  Comment

                  Working...
                  X