How i redirect output to file? >piclog.txt not work..

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

Moderators: XnTriq, helmut, xnview

Guest

How i redirect output to file? >piclog.txt not work..

Post by Guest »

nconvert -v -rmeta -rexifthumb -q 65 -ratio -text_flag center -text "text1" -text_back 0 255 255 -text_flag bottom-right -text "text2" pic\*.* >piclog.txt


How i redirect output to file? >piclog.txt not work..
User avatar
xnview
Author of XnView
Posts: 45224
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: How i redirect output to file? >piclog.txt not work..

Post by xnview »

Do you have tried >1
Pierre.
Guest

Post by Guest »

you mean

1>

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

Post by xnview »

Anonymous wrote:you mean

1>

?
Yes sorry
Pierre.
Guest

Post by Guest »

i not understand this, but this syntax give windows batch automatically !!
(i use Win2K)

but some messages go to file and some messages (ADD TEXT etc.) go to console...

please try this...
User avatar
xnview
Author of XnView
Posts: 45224
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

Sorry i don't understand???
Pierre.
Krzysiek
Posts: 2
Joined: Mon Mar 30, 2020 11:02 pm

Re: How i redirect output to file? >piclog.txt not work..

Post by Krzysiek »

I was just looking for a solution to the same problem. And here's what I found.
Nconvert sends some information to stderr and others to stdout.
Normally only stdout can be redirected to a file.
All you need to do is redirect stderr to stdout and then everything can be redirected to a file.
To do this, add the characters "2>&1" at the very end of the command.
Cmd.exe will interpret these characters as a command to redirect stderr to stdout.
For example, using the command given at the beginning of this thread:

Code: Select all

nconvert -v -rmeta -rexifthumb -q 65 -ratio -text_flag center -text "text1" -text_back 0 255 255 -text_flag bottom-right -text "text2" pic\*.* >piclog.txt 2>&1