Whats 2>%1

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Calvogalatra
Posts: 7
Joined: 31 May 2010 15:35

Whats 2>%1

#1 Post by Calvogalatra » 31 May 2010 21:18

Hi

Im not sure of the syntaxis but i think it is this way
whats 2>%1 for
also 3>%1
and I just see on the net
2>@1

Thanks
Calvo

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Whats 2>%1

#2 Post by aGerman » 01 Jun 2010 11:18

Well, > is for redirecting of an output to a file or a device (eg. printer, screen, NUL).
2 is for redirecting the stdErr (error message)
3 is an user defined channel
%1 is the first argument you gave to the batch process
I've never seen 2>@1 because this will create a file named "@1"

But there is another thing you could find somewhere:
2>&1 would bring together stdErr and stdOut to stdOut

Regards
aGerman

Calvogalatra
Posts: 7
Joined: 31 May 2010 15:35

Re: Whats 2>%1

#3 Post by Calvogalatra » 01 Jun 2010 22:31

Hi aGerman

Thx for replying

Is there any document or page in which i can read more about batch? I would like to start doing some examples.

Calvo

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Whats 2>%1

#4 Post by aGerman » 02 Jun 2010 11:29

Calvogalatra wrote:Hi aGerman

Thx for replying

Is there any document or page in which i can read more about batch? I would like to start doing some examples.

Calvo

Well, my nickname is not a joke. I could give you some good links to german tutorials, but I think it would be senseless for you :|
But you are on http://www.dostips.com/ and you'll find some excelent examples above.

Regards
aGerman

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

Re: Whats 2>%1

#5 Post by jeb » 02 Jun 2010 11:57

Hi,

aGerman wrote:I could give you some good links to german tutorials, but I think it would be senseless for you :|


but not for me (and some others here) because I'm a German too, but not aGerman :)

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Whats 2>%1

#6 Post by aGerman » 02 Jun 2010 12:29

:lol: Yeah, jeb ... I'm absolutely certain that you need a batch tutorial :lol:

OK, for you, other Germans an not for aGermans :mrgreen:
a tut collection
a good forum

Regards
a( )German

Post Reply