Page 1 of 1

Difference in speed in redirection left/right?

Posted: 15 Jan 2013 22:36
by carlos
I always would ask this.
Is there a significant difference in speed between use:

Code: Select all

> txt.tmp (echo(Text)

and:

Code: Select all

echo(Text> txt.tmp


In the first the redirection is specified in left and in the second in right.

Re: Difference in speed in redirection left/right?

Posted: 16 Jan 2013 00:33
by jeb
Hi carlos,

there should be no difference at all, as both lines will be executed in the same manner.

Code: Select all

@echo ON
echo(Text> txt.tmp
> txt.tmp echo(Text


Output wrote:C:\temp>echo(Text 1>txt.tmp
C:\temp>echo(Text 1>txt.tmp

As you can see CMD.exe reorder the redirection always to the end of a line.

jeb

Re: Difference in speed in redirection left/right?

Posted: 16 Jan 2013 04:58
by carlos
Thanks jeb for reply.