Batch File loop not working - Working for XP

Microsoft Windows server 2003 enterprise
February 23, 2010 at 03:13:29
Specs: windows server 2003
http://www.computing.net/answers/wi...

I've this logic working ... which you can check in the above link ...

But the same fails in Windows Server 2003 dos prompt whose version is 5.2.3790

I tried putting echo command and figured out that it fails @

FOR /F "tokens=1,2,3 delims=," %%a IN (NotifyGroup.txt) DO (

What is the syntax for the same?


See More: Batch File loop not working - Working for XP

Report •


#1
February 24, 2010 at 02:51:44
Not obvious why.

What's the DO doing?


=====================================
Helping others achieve escape felicity

M2


Report •

#2
February 24, 2010 at 05:41:53
The syntax remains consistent from Win2K though Win7.

Report •

#3
February 24, 2010 at 05:52:21
Inside the loop you've got:

set tempmail=%temp%\tempmail.%random%.txt

but %random% will only be expanded at the start of the loop and the same value will be used in all iterations.

Try using !random! instead.


Report •

Related Solutions


Ask Question