Page 1 of 1

Error output folder name

Posted: Tue Aug 11, 2015 9:40 am
by kosho
Hello,

With the command :

Code: Select all

nconvert -o "C:\#test\jpg\7V1A3881.JPG" -out jpeg -resize 1920 1280  -opthuff -q 90 -i "C:\#test\7V1A3881.JPG"
the result :
Conversion of C:\#test\7V1A3881.JPG into C:\1test\jpg\7V1A3881.JPG OK

Why the output folder is changed to C:\1test?

Re: Error output folder name

Posted: Tue Aug 11, 2015 12:35 pm
by cday
kosho wrote:With the command :

Code: Select all

nconvert -o "C:\#test\jpg\7V1A3881.JPG" -out jpeg -resize 1920 1280  -opthuff -q 90 -i "C:\#test\7V1A3881.JPG"
the result :

Conversion of C:\#test\7V1A3881.JPG into C:\1test\jpg\7V1A3881.JPG OK

Why the output folder is changed to C:\1test?
In the NConvert help file '#' is defined as a numeric enumerator:

Code: Select all

Options :
...
-o filename       : Output filename
              Use # to specify position of numeric enumerator
              Use % to specify source filename
              Use $ to specify full source pathname
              Use $$ to specify source folder name
I don't know if there is a way to 'escape' that interpretation, but doubling as required to escape some characters in a Windows batch file would be interpreted as a two-character numeric enumerator...

Edit -- Two possibly relevant posts:

Re: output to folders with "#"

Filenames with % character

I don't know if the proposal in the first was implemented, and the second suggests that it might be worth trying '##' contrary to my thought above?

Does anyone know if '#' can be escaped when used in an output file name?

Re: Error output folder name

Posted: Mon Aug 17, 2015 12:26 pm
by xnview
if i add $# to escape #??

Re: Error output folder name

Posted: Mon Aug 17, 2015 12:37 pm
by cday
xnview wrote:if i add $# to escape #??
Whatever you think would be best... :D

I don't know if there are any conventions for escape characters; a character that would be unlikely to be used in a file name might be a good choice (such as ^ or ~ perhaps?) or even a character that would be illegal in a (Windows) filename such as '>' if that is technically possible??

Consistentcy with any other escape use cases in NConvert would be desirable.

Other suggestions welcome...

Re: Error output folder name

Posted: Tue Aug 18, 2015 8:24 am
by cday
As '#' is a numeric enumerator that may, if I understand correctly, be included in code as '#' '##' '###' etc, any escape notation should if possible work for any representation...

As for the escape notation to be used, that is really outside my experience (I never expected even to use the command line... :wink: ) but I have presented some thoughts above that may or may not make sense.

Re: Error output folder name

Posted: Thu Aug 20, 2015 9:10 am
by kosho
It worked in version :
** NCONVERT v5.50 (c) 1991-2009 Pierre-E Gougelet (Sep 16 2009/15:20:46) **

And it is replace # with 1 when I tried the new version.
# is a numeric enumerator for file name, not for folder.

Re: Error output folder name

Posted: Thu Aug 20, 2015 11:09 am
by xnview
kosho wrote: And it is replace # with 1 when I tried the new version.
# is a numeric enumerator for file name, not for folder.
i've added $# for next version. But is it needed to have # for folder name??

Re: Error output folder name

Posted: Tue May 15, 2018 8:56 pm
by gautxori
Can xnview make a note of this in nconvert help?