Convert all PNG and TIFF files within a folder structure to JPEG files

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

fabian.schmidt
Posts: 3
Joined: Sat Jun 15, 2024 1:57 pm

Convert all PNG and TIFF files within a folder structure to JPEG files

Post by fabian.schmidt »

I've been trying, but I never get the result

I get failing notes: "Saving error(s):
/Volumes/COSMO/1 Recherche Repository/Test xn/folder 1/untitled folder 2/1 9 1 2.tif
/Volumes/COSMO/1 Recherche Repository/Test xn/folder 1/untitled folder 2/1 9 1 3.tif

what can be the reason? Is this perhaps not meant to work? What special settings do I have to follow?
cday
XnThusiast
Posts: 4179
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Replace all png and tif files within a structure with many folders and subfiolders into jpg

Post by cday »

You wish to convert all PNG and TIFF files within a folder structure to JPEG files?

If so, that should be possible using the 'Batch convert' tool in xnview software: if you are using XnView Classic, I suggest that you first install the newer XnView MP software, or if you only need batch conversion operations the excellent stand-alone XnConvert software.

You can then load the parent folder to be converted on the Input tab, and review the Output and Settings tab options carefully, selecting the options to keep the folder structure, and if required the option to keep the parent folder.

Always test using a copy of your files, particularly important in this case with the need to maintain the existing folder structure... :wink:

Note 1: If the folder structure contains files other than PNG and TIFF files they will also be converted, I don't see any way of only converting selected file types. That could, however, be possible using an NConvert batch file.

Note 2: I have little or no personal experience of converting folder structure myself, so proceed with great caution!
fabian.schmidt
Posts: 3
Joined: Sat Jun 15, 2024 1:57 pm

Re: Replace all png and tif files within a structure with many folders and subfiolders into jpg

Post by fabian.schmidt »

thanks for the swift reply.

That's exactly what I have been trying (with XnConvert), however: it didn't work.

For one: the app asks me in the end, where I want to save the result, which means it does not plan to replace the images, but to simply re-errect the folder structure and place the jps in there (without the other documents, who can possibly need such a service?). Secondly: certain files are skipped and not converted, but the originals deleted anyway...

So, maybe I make mistakes in checking the wrong boxes. I now managed to get XnConvert to replace within folders (by chosing exact the same parent folder as target - pretty strange that I would need to do that, but whatever) - but still xn convert doesn't delete the original files. Any ideas why that is so?
cday
XnThusiast
Posts: 4179
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Replace all png and tif files within a structure with many folders and subfiolders into jpg

Post by cday »

fabian.schmidt wrote: Sat Jun 15, 2024 3:56 pm That's exactly what I have been trying (with XnConvert), however: it didn't work.

The app asks me on the Output tab where I want to save the result, which means it does not plan to replace the images, but to recreate the folder structure and place the jps in there (without the other documents, who can possibly need such a service?).
There is an option on the Output tab to place the resulting files in the Source folder... Edit: I see below that you have, I think, discovered that option.
Secondly: certain files are skipped and not converted, but the originals deleted anyway...
Are the missed files possibly not image files, such as document or text files? Possibly XnConvert ignores such input files, as they can't be converted.

A reason for always testing using copies of files... :wink:

Rather than post that as a bug, with steps to reproduce, you might better post a suggestion in the XnConvert section of the forum to add an option to copy, rather than ignore non-image files, so that the use of XnConvert can be extended to that situation which might sometimes arise.
So, maybe I make mistakes in checking the wrong boxes. I now managed to get XnConvert to replace within folders (by choosing exact the same parent folder as target - pretty strange that I would need to do that, but whatever) - but still xnconvert doesn't delete the original files. Any ideas why that is so?
I'm getting a little confused, but on the Output tab there is an option to delete original files, have you tried that? However, if you wish non-image files to be retained but image files to be converted to JPEGs, and the source image files to be deleted, some further thought on possible new options might be needed. Possibly easier if the output is placed in a new folder.