How to save the result image in a sub-folder ?

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

Moderators: helmut, XnTriq, xnview

boxig
Posts: 11
Joined: Wed May 28, 2008 7:20 pm

How to save the result image in a sub-folder ?

Post by boxig »

How to save the result image in a sub-folder ?
Should the sub-folder exist already or it is can created while saving file ?
Please give me a sample code.

Thank you
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to save the result image in a sub-folder ?

Post by xnview »

boxig wrote:How to save the result image in a sub-folder ?
Should the sub-folder exist already or it is can created while saving file ?
Please give me a sample code.
For example -o sub/output.jpg
Pierre.
boxig
Posts: 11
Joined: Wed May 28, 2008 7:20 pm

Thank you.

Post by boxig »

Thank you.
nh2user
Posts: 28
Joined: Sun Mar 29, 2009 2:44 pm

Re: How to save the result image in a sub-folder ?

Post by nh2user »

How Do I make the output filename use the original filename and add a number to it ?

using # and $ and % doesn't work !

thanks in advance
nh2user
Posts: 28
Joined: Sun Mar 29, 2009 2:44 pm

Re: How to save the result image in a sub-folder ?

Post by nh2user »

xnview wrote:
boxig wrote:How to save the result image in a sub-folder ?
Should the sub-folder exist already or it is can created while saving file ?
Please give me a sample code.
For example -o sub/output.jpg
this is not working :

nconvert.exe -quiet -xall -size 256x256+0 -out jpeg -o sub/output.jpg -q 90 -i -keep_icc -opthuff -dct 2 -smoothingf 0 -subsampling 2 -keepfiledate -keepcspace -buildexifthumb one.jpg

it gives me an error :

can't create file sub/output.jpeg

any tips ?
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to save the result image in a sub-folder ?

Post by xnview »

nh2user wrote: can't create file sub/output.jpeg
any tips ?
Do you have created sub folder?
Pierre.
nh2user
Posts: 28
Joined: Sun Mar 29, 2009 2:44 pm

Re: How to save the result image in a sub-folder ?

Post by nh2user »

No, the subfolder is not being created.

tu peux me parler en francais si tu veux.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to save the result image in a sub-folder ?

Post by xnview »

nh2user wrote: tu peux me parler en francais si tu veux.
NConvert ne cree pas les dossiers
Pierre.
nh2user
Posts: 28
Joined: Sun Mar 29, 2009 2:44 pm

Re: How to save the result image in a sub-folder ?

Post by nh2user »

xnview wrote:
nh2user wrote: tu peux me parler en francais si tu veux.
NConvert ne cree pas les dossiers
Il ne cre pas les dossiers, mais les ## et les $$ ne marchent pas non plus dans le command

il me met des numero mais ne retranscrit pas le nom du fichier
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to save the result image in a sub-folder ?

Post by xnview »

nh2user wrote:il ne cre pas les dossiers, mais les ## et les $$ ne marchent pas non plus dans le command
il me met des numero mais ne retranscrit pas le nom du fichier
comment ça?
Pierre.
nh2user
Posts: 28
Joined: Sun Mar 29, 2009 2:44 pm

Re: How to save the result image in a sub-folder ?

Post by nh2user »

nconvert.exe -quiet -xall -size 256x256+0 -out jpeg -q 90 -i -keep_icc -opthuff -dct 2 -smoothingf 0 -subsampling 2 -keepfiledate -keepcspace -buildexifthumb

si je rajoute -o $#

il ne me met pas le nom du fichier.

en fait, je souhaite avoir le nom du fichier original + un chiffre a la fin. Comme ca, il n'ecrit pas sur le fichier original si il est du meme format.

car un resize d'un fichier .jpg vers un autre plus petit. M'ecrase l'ancien avec cette formule

cordialement
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to save the result image in a sub-folder ?

Post by xnview »

# n'est utilisé qu'en sequence avec -n
Pierre.
nh2user
Posts: 28
Joined: Sun Mar 29, 2009 2:44 pm

Re: How to save the result image in a sub-folder ?

Post by nh2user »

Vous pouvez me donner la ligne de commande svp ? pour avoir un fichier d'export pour avoir le meme nom que le fichier original avec en plus un chiffre au bout, chiffre a 4 numeros.

merci

a quoi sert le -o alors ?
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to save the result image in a sub-folder ?

Post by xnview »

Il n'y a pas de possibilité. # n'est utilisé qu'avec -n
-o precise le chemin/nom de sortie
Pierre.
nh2user
Posts: 28
Joined: Sun Mar 29, 2009 2:44 pm

Re: How to save the result image in a sub-folder ?

Post by nh2user »

un exemple de -n ?

cordialement
Post Reply