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

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

Moderators: XnTriq, xnview

Post Reply
Guest

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

Post by Guest » Mon Jun 30, 2008 2:23 am

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: 33668
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview » Mon Jun 30, 2008 6:14 am

Do you have tried >1
Pierre.

Guest

Post by Guest » Tue Jul 01, 2008 3:39 am

you mean

1>

?

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

Post by xnview » Tue Jul 01, 2008 6:30 am

Anonymous wrote:you mean

1>

?
Yes sorry
Pierre.

Guest

Post by Guest » Tue Jul 01, 2008 11:21 am

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: 33668
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Tue Jul 01, 2008 2:55 pm

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 » Mon Mar 30, 2020 11:30 pm

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

Post Reply