file extension error?

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

Moderators: XnTriq, helmut, xnview

cday
XnThusiast
Posts: 3460
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: file extension error?

Post by cday »

I rarely find videos helpful, I'm afraid, generally too fast and the images are often too small to see clearly, but maybe Pierre can follow yours.. :?:

Otherwise, would you be able to provide a series of screenshot images that can be viewed and examined in detail more easily? The current attachment limit is eight, I believe, which should be enough, otherwise you could post more images in a ZIP attachment, or provide a download link.
tomv
Posts: 15
Joined: Sat Oct 30, 2021 4:33 pm

Re: file extension error?

Post by tomv »

HI, thanks for your reply,
I think these 3 images synthesize what is happening:
You do not have the required permissions to view the files attached to this post.
cday
XnThusiast
Posts: 3460
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: file extension error?

Post by cday »

Much easier to follow, thanks, I opened the three attachments in adjacent browser tabs... :D

I still can't see an explanation, though, but I can make some suggestions that (again) probably won't be helpful:

o You have both -D and -overwrite and I'm not sure of the logic of that, although it probably is of no significance in practice.

o The -o term still doesn't include an extension, although you previously said that including one didn't resolve the issue.

o What if you remove the alternative ....*.jpeg input term?

o Presumably IMG_6201.JPG_original doesn't open in XnView MP (or 'Classic)?

o You have NConvert v7.95 installed, the help file of my recently downloaded versions shows v7.98, which is unlikely to be significant, but for want of an immediate way forward you might try testing with a slightly earlier version just in case of a recent regression in the code.

o In general in a case like this where there is no obvious way forward, it can be useful to simplify the tested code to the minimum required to illustrate the issue, sometimes in doing that the reason becomes apparent. Alternatively, if possible try approaching the problem in a different way.

Otherwise, maybe Pierre see the issue... :?:
User avatar
xnview
Author of XnView
Posts: 38714
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: file extension error?

Post by xnview »

the problem is the way that windows expands wildchar, if you use

Code: Select all

dir "*.jpg" "*.jpeg"
.jpg_orignal is listed
Pierre.
cday
XnThusiast
Posts: 3460
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: file extension error?

Post by cday »

tomv wrote: Thu Dec 09, 2021 8:01 pm I have a folder with these 2 files: IMG_4954.JPG and IMG_4954.JPG_original.

Then exec this command:

.\NConvert\nconvert -o "..\CARPETA_DE_PROCES\%%" -keep_icc -ratio -rtype hanning -rflag decr -resize shortest 1500 -rotate 90 -D -overwrite "..\CARPETA_DE_PROCES\*.jpg " "..\CARPETA_DE_PROCES\*.jpeg "

The problem is that "IMG_4954.JPG_original" is unexpectedly processed too...
xnview wrote: Thu Jan 06, 2022 9:59 am the problem is the way that windows expands wildcards, if you use

Code: Select all

dir "*.jpg" "*.jpeg"
.jpg_orignal is listed
Should that stop IMG_4954.JPG_original being read, which is the issue?
tomv
Posts: 15
Joined: Sat Oct 30, 2021 4:33 pm

Re: file extension error?

Post by tomv »

Hi, thanks both for your replys

Yes, it's true. I had not thought about it or tried it, it does not seem true but windows treats it like that, a big mistake from my point of view ...