Difference in speed in redirection left/right?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
carlos
Expert
Posts: 503
Joined: 20 Aug 2010 13:57
Location: Chile
Contact:

Difference in speed in redirection left/right?

#1 Post by carlos » 15 Jan 2013 22:36

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.

jeb
Expert
Posts: 1058
Joined: 30 Aug 2007 08:05
Location: Germany, Bochum

Re: Difference in speed in redirection left/right?

#2 Post by jeb » 16 Jan 2013 00:33

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

carlos
Expert
Posts: 503
Joined: 20 Aug 2010 13:57
Location: Chile
Contact:

Re: Difference in speed in redirection left/right?

#3 Post by carlos » 16 Jan 2013 04:58

Thanks jeb for reply.

Post Reply