Announcement

Collapse
No announcement yet.

Batch Autocorrect File Types on Folders

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

    Solved Batch Autocorrect File Types on Folders

    When folders (aka directories) have multiple images where the file extension does not match, when browsing the folder, irfanview pops a dialog asking if you want to change it. REQUEST: provide a batch validate, rename, log change function.
    Last edited by Bhikkhu Pesala; 10.07.2017, 09:31 PM. Reason: Second request split to new thread

    #2
    The batch rename dialogue can not only change file name, but also file extensions. To do so, follow these steps.
    - Open one image with wrong extension in Irfanview
    - Press 'b' on the keyboard to open the batch conversion window
    - On the upper left side of the window mark 'Work as batch rename'
    - On the upper right side mark all relevant files in the file list and press the 'Add' button
    - On the left side in the field Name Pattern enter '$N.[ext]', where [ext] is the desired extension
    - In the field below enter the output directory or press the 'Use current...'-button
    - Control all settings and press 'Start batch'

    Hope this helps.
    Win 10/64 Home 22H2 IrfanView 4.66/64
    Hate has caused a lot of problems in this world, but it has not solved one yet. (Maya Angelou)

    Comment


      #3
      Kuki Dent's answer will work, but it will change all files to a single (user-chosen) extension.
      If you put this in the field "Name Pattern":
      $N$Q
      It will auto-correct extensions.

      Comment


        #4
        I want you to know that I joined this forum just to say "Thank You" to you for that piece of knowledge. I am working on a HUGE migration and this has literally saved me days for work. I have about been doing it manually for about a week to get a baseline for time involved and this process has removed 6+ hours per day into something that I can execute and not have to worry about.
        "Thank You"

        Comment


          #5
          Ok, I realize this is a bit old, but looking at the original topic, and then the two answers about the batch tool, there seems to be a rather large disconnect.

          What the original poster was looking for is a means to automate the default behavior described as:

          When you find a file, either directly from Explorer or from within the viewer, and the file extension doesn't line up with the file type (as in, a JPG that has been saved with a PNG extension), the program pops up a dialog that allows you to correct the extension to match the actual file type.This isn't about selecting "all" .PNG to change to .JPG or the like. It's about touching each file in a directory (tree), determining if it matches with the current extension, and if not then it automatically changes the extension to match without needing to click the "Yes" option for each file found.

          Click image for larger version

Name:	image_6537.jpg
Views:	628
Size:	17.0 KB
ID:	96548
          Last edited by Bhikkhu Pesala; 08.12.2022, 10:23 AM. Reason: Cropped attached image

          Comment


            #6
            Originally posted by Ssurgul View Post
            What the original poster was looking for is a means to automate the default.
            The reply by lee321987 answers the question.
            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

            Comment


              #7
              Thank you very much lee321987 for the hint about the "Name pattern":
              Code:
              $N$Q
              Click image for larger version  Name:	IrfanView-Batch conversion for multiple folders - Outputfolder.png Views:	0 Size:	138.4 KB ID:	96776

              How can I solve this "rename to the correct extension" for several subfolders at once BUT let IrfanView save the renamed files in the respective folders?
              (I don't want to move the renamed files into one single folder).

              Click image for larger version  Name:	IrfanView-Batch conversion for multiple folders.png Views:	0 Size:	76.9 KB ID:	96775
              What do I have to choose/enter in Outputfolder?
              Would that be
              Code:
              $D
              And what do I have to set to RENAME the files - not copy them with the correct extension?
              I want to have a file called "filename_with_wrong.png" to be replaced with "filename_with_wrong.jpg", not as an additional copy with the correct file extension.

              Comment


                #8
                Browse to select the output folder. Check the Include subfolders option. In the Advanced batch dialog set the option to Create subfolders in destination folder.
                Please see this recent thread.
                Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                Comment


                  #9
                  That works great Bhikkhu Pesala , thank you very much!

                  It also works fine (without leaving the filenames with the "wrong" extension) in my environment with these
                  "Batch rename settings" and the option "Rename original/input files..."
                  Click image for larger version  Name:	Batch rename settings.png Views:	0 Size:	79.0 KB ID:	96780

                  Comment

                  Working...
                  X