file extension error?
Moderators: XnTriq, helmut, xnview
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
file extension error?
Hi there,
I'm on windows 10, nconvert v7.95
I have a folder with this 2 files:
IMG_4954.JPG
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 the image "IMG_4954.JPG_original" is unexpectedly processed too. Nconvert is taking the file type not from file extension?
thanks.
best regards
I'm on windows 10, nconvert v7.95
I have a folder with this 2 files:
IMG_4954.JPG
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 the image "IMG_4954.JPG_original" is unexpectedly processed too. Nconvert is taking the file type not from file extension?
thanks.
best regards
-
- XnThusiast
- Posts: 4136
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: file extension error?
Two thoughts, possibly neither very helpful:
1. With your input term "..\CARPETA_DE_PROCES\*.jpeg " rather than "... *.jpg" I'm surprised that either file is processed!
2. Acceptance of "IMG_4954.JPG_original" as an input filename is possibly not a design case, not anticipated that syntax would be used.
1. With your input term "..\CARPETA_DE_PROCES\*.jpeg " rather than "... *.jpg" I'm surprised that either file is processed!
2. Acceptance of "IMG_4954.JPG_original" as an input filename is possibly not a design case, not anticipated that syntax would be used.
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: file extension error?
Hi, thanks for your response. For me seems that nconvert looks the file type inside file instead of on the file extension.
-
- XnThusiast
- Posts: 4136
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
-
- Author of XnView
- Posts: 44572
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: file extension error?
and if you use without "?
Code: Select all
.\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
Pierre.
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: file extension error?
Sorry, I thought I had activated the email notifications and until today I have not seen the message.
Yes, removing "the same thing happens
Yes, removing "the same thing happens
-
- XnThusiast
- Posts: 4136
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: file extension error?
Not solved?
I have tested *.jpg and *.jpeg, and source files are filtered correctly according to their extension...
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: file extension error?
hi,
.jpg and .jpg files are correctly processed, the point is that in the directory I hava files with file format "name.JPG_original" that is suposed not to be processed
.jpg and .jpg files are correctly processed, the point is that in the directory I hava files with file format "name.JPG_original" that is suposed not to be processed
-
- XnThusiast
- Posts: 4136
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: file extension error?
Agreed that it wouldn't be expected to be processed...
Seems reasonable, you could possibly try other ways of disabling reading of unwanted files, maybe .xxx for example...
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: file extension error?
only Pierre knows for sure, but it seems that the program checks if a file is of the jpg type by reading some attribute and not the extension.
Looking for another way to not process these files? yes, for example I can call the program iteratively for each specific file. But for me it is a thing to fix. Imagine that you have files that you want to keep intact and the program processes them when it was not supposed to ...
Looking for another way to not process these files? yes, for example I can call the program iteratively for each specific file. But for me it is a thing to fix. Imagine that you have files that you want to keep intact and the program processes them when it was not supposed to ...
-
- XnThusiast
- Posts: 4136
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: file extension error?
Doesn't the fact that the code correctly distinguishes .jpg and .jpeg show that is not the case?
If you wish to use your existing code you might, as you know how you are operating, change to the extension to .png for example, if you use an extension that isn't recognised the files won't be processed but an error will be reported in the terminal output for each file, may or may not be an issue.
Something like that might provide a workaround pending a possible fix by Pierre, if needed.
That should be the case if he considers the issue...
-
- Author of XnView
- Posts: 44572
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: file extension error?
i can't reproduce, only .jpg/.jpeg are processed... you use terminal to execute this command?
Pierre.
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: file extension error?
Hi, I use this instructions in a cmd batch file
-
- XnThusiast
- Posts: 4136
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: file extension error?
Looking at your code, two observations:
In the above term you haven't included a file extension, which I think should be included, although it may not always actually be necessary.
And in the above terms there is a space after the extension before the quote ", which probably isn't actually an issue.
You might test at least the first suggestion in this unexplained situation, although even so Pierre was unable to reproduce the result you are obtaining.
Code: Select all
-o "..\CARPETA_DE_PROCES\%%"
Code: Select all
"..\CARPETA_DE_PROCES\*.jpg " "..\CARPETA_DE_PROCES\*.jpeg "
You might test at least the first suggestion in this unexplained situation, although even so Pierre was unable to reproduce the result you are obtaining.
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: file extension error?
Hi there and happy new year!
Unfortunately the two issues discussed in the previous message are not the cause.
I don't understand how Pierre can't reproduce the error. I attach a small video where you can see what happens. Look at the size of the images and that the .JPG_original file is also processed.
Unfortunately the two issues discussed in the previous message are not the cause.
I don't understand how Pierre can't reproduce the error. I attach a small video where you can see what happens. Look at the size of the images and that the .JPG_original file is also processed.
You do not have the required permissions to view the files attached to this post.