Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch file question

Status
Not open for further replies.

JohnCHolmes

Technical User
Jun 25, 2002
59
0
0
US
In W2K all file redirection (e.g. >FOO) does not work from batch files. What I see (echoed) is
1>
instead of
>

Anyone know why?

Please don't answer if you don't know. Or at least _say_ you don't know, if you just want to venture a guess. The then "leading expert" in this forum was recently spewing batch file advice as though he had a 'clue' though he clearly doesn't know Shinola about them. Thanks kindly :)
 
Oops, I should have said then that only >NUL "fails." Other file redirection apparently works, albeit still showing the funky "1".
 
Okay, I'll bite.

I am very curious to see an example of what you are seeing. Would you be willing to post a sample batch file (or partial)? I have not personally seen what you are describing, and I can't duplicate the issue from what you have posted so far (could be because I'm slow, but you know.....)!

I love batch files--in fact I use too many of them (even idr.bat so that dir works when I type badly LOL ), but I just can't see what you are trying to accomplish!

Thanks! Good luck!

Mudskipper
 
I thought I had a perfect example but this looks like Doh! Yet Another user error (on me).

It seems I saved the .BAT in 2 places (which were CD'd inside the batch) and drew wrong conclusions, not carefully noting where I was when I started. STILL I am seeing "1>" when the commands are executed and ECHO is on (you don't get that either, eh?).

Sorry to all - I think I blew this one, and I appreciate the restraint - so far. You can let it rip now!
 
Actually, right after I posted, I began to see the 1> with my test. I could not tell you why it is showing this, but I can tell you that it does not adversly affect the results of my batch file in any way. The best that I can find relating to help in this area is that there is a 1> and a 2>, and win2k is simply defaulting to 1>. I do not know the difference between them, though. Might be worth digging up later, but for now, it is time for a beer!

Have a good weekend. Mudskipper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top