nconvert Filename extension forced to lowercase ?

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

hmayer1980
Posts: 7
Joined: Sun Jun 29, 2014 8:47 am

nconvert Filename extension forced to lowercase ?

Post by hmayer1980 »

Hi,

I use this comandline to create thumbnails in a thumbs subfolder with a name prefix on my windows 8.1 64 Bit machine.

Code: Select all

nconvert -quiet -overwrite -o $\thumbs\phoca_thumb_l_%% -opthuff -dct 2 -subsampling 2 -keepfiledate -rexifthumb -ratio -rtype lanczos -rflag decr -resize longest 800  -wmopacity 100 -wmfile "%Watermarkdir%\GeneratePhocaThumbs\watermark-large.png" -wmflag bottom-right %workdir%\*.JPG
The output is fine - except the extension gets converted to a lowercase.
For example file "IMG_1066.JPG" gets converted to "phoca_thumb_l_IMG_1066.jpg" - but should be "phoca_thumb_l_IMG_1066.JPG"

I do upload the thumbs to my website and this is a linux server so filenames are case sensitive and the software searches for an upper case JPG if the original file was upper case JPG.
How do I fix this?
I have not found any option like in XnConvert to preserve the Case of the filename nor can I explicitly specify the output MASK like "$\thumbs\phoca_thumb_l_%%.JPG" - it results in lower case again!

Thanks for your help
Hannes

PS: I found first XnConvert which has more options and from a softare developer standpoint - why isnt nconvert just the commandline tool for XnConvert - why are those two completly seperate with simmilar - but not equivalent capabilities? (why doesn´t the UI of XnConvert just use NConvert?)
cday
XnThusiast
Posts: 4187
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: nconvert Filename extension forced to lowercase ?

Post by cday »

hmayer1980 wrote:
I use this comandline to create thumbnails in a thumbs subfolder with a name prefix on my windows 8.1 64 Bit machine.

The output is fine -- except the extension gets converted to a lowercase.

I upload the thumbs to my website and this is a linux server so filenames are case sensitive and the software searches for an upper case JPG if the original file was upper case JPG.

How do I fix this?
I think the only immediate solution is to use a renaming utility to rename the output files from NConvert so that the filename extensions are uppercase, unless someone else knows of a workaround? @xnview?

There is a command line renaming utility which could probably be used in a Windows batch file after your NConvert script to output the filenames you need directly:

http://www.bulkrenameutility.co.uk/Command.php

You could also make a specific request, possibly in a new thread, for Pierre to add support for case-sensitivity to NConvert, assuming that is possible in the Windows version. Interestingly, there is in fact a Linux version of NConvert...
I found first XnConvert which has more options and from a softare developer standpoint - why isnt nconvert just the commandline tool for XnConvert - why are those two completly seperate with simmilar - but not equivalent capabilities?
NConvert and XnView 'Classic' long predate XnConvert and XnViewMP, which are cross-platform with Unicode support and feature acclaimed 'fresh-start' interfaces... :D
User avatar
XnTriq
Moderator & Librarian
Posts: 6389
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: nconvert Filename extension forced to lowercase ?

Post by XnTriq »

XnView Classic: Tools » Batch Rename... » Case » Extension: Uppercase
p120574.png
You do not have the required permissions to view the files attached to this post.
cday
XnThusiast
Posts: 4187
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: nconvert Filename extension forced to lowercase ?

Post by cday »

hmayer1980 wrote:I use this comandline to create thumbnails in a thumbs subfolder with a name prefix on my windows 8.1 64 Bit machine.

[...]

The output is fine - except the extension gets converted to a lowercase.

I upload the thumbs to my website and this is a linux server so filenames are case sensitive and the software searches for an upper case JPG if the original file was upper case JPG.
Would another option, if you wish to use NConvert rather than create the thumbnails in XnConvert if that is possible, be to convert the image filename extensions to lower case [using XnConvert for example] and then upload those images and the thumbnails produced with NConvert, both with lowercase extensions?
hmayer1980
Posts: 7
Joined: Sun Jun 29, 2014 8:47 am

Re: nconvert Filename extension forced to lowercase ?

Post by hmayer1980 »

Thanks for the information.

I was just curious if I do something wrong.
I could do the upper case with batch commands.

Since there was everywhere Windows/Linux and Mac support - change the case of file names breaks everything in linux thats why I wondered.

I use NConvert over XnConvert because in a batch I can create all my Thumbnails at once - 7 different sizes.
General Speaking I would prefer XnConvert if I could really create a batch - generate multiple output files with multiple transformations at once. With nconvert i just created a batch file and drop my folder (=filelist) on it and get all I need.

Thanks for the Input

May I propose a change of the software to keep the case in a future release...

Hannes
hmayer1980
Posts: 7
Joined: Sun Jun 29, 2014 8:47 am

Re: nconvert Filename extension forced to lowercase ?

Post by hmayer1980 »

I am curious if there has something changed since there is a new version available?
User avatar
xnview
Author of XnView
Posts: 44936
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: nconvert Filename extension forced to lowercase ?

Post by xnview »

hmayer1980 wrote:I am curious if there has something changed since there is a new version available?
do you have tried lastest version?
Pierre.
hmayer1980
Posts: 7
Joined: Sun Jun 29, 2014 8:47 am

Re: nconvert Filename extension forced to lowercase ?

Post by hmayer1980 »

xnview wrote:do you have tried lastest version?
It does not work in the latest Version (6.70)
User avatar
xnview
Author of XnView
Posts: 44936
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: nconvert Filename extension forced to lowercase ?

Post by xnview »

try with

Code: Select all

-no_auto_ext
Pierre.
hmayer1980
Posts: 7
Joined: Sun Jun 29, 2014 8:47 am

Re: nconvert Filename extension forced to lowercase ?

Post by hmayer1980 »

That is a valid workaround. Thank you.
I still would recommand an improvement of the Software to Keep the original case of the file name components.

Thank you.