Batch File List Reading Error

March 28, 2009 at 21:59:58
Specs: Windows XP
Ive been using a code I got from here: http://www.computing.net/answers/pr...
without issue for the past day or so and all of the sudden while I was making some changes it stopped working.

Here is my code:
@echo off & setLocal EnableDelayedExpansion

set N=

for /f "tokens=* delims=" %%a in (inv.txt) do (
set /a N+=1
set var!N!=%%a
)

set v

And this is the error i'm getting:

E:\Documents and Settings\cmdrfred\Desktop\Auto Inviter\new verison>setLocal Ena
bleDelayedExpansion

E:\Documents and Settings\cmdrfred\Desktop\Auto Inviter\new verison>set N=

E:\Documents and Settings\cmdrfred\Desktop\Auto Inviter\new verison>for /F "toke
ns=* delims=" %a in (inv.txt) do (
set /a N+=1
set var!N!=%a
)

E:\Documents and Settings\cmdrfred\Desktop\Auto Inviter\new verison>set v
Environment variable v not defined

I copied and pasted from the original again and still no luck. any ideas?


See More: Batch File List Reading Error

Report •


#1
March 29, 2009 at 01:52:01
[1] Spare us the clutter by running in a shorter path.

[2] Nothing wrong with the bat you posted. What's in inv.txt?


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#2
March 29, 2009 at 05:34:42
Mechanix2Go: What's in inv.txt?
Apperently nothing; the FOR loop doesn't run.

Report •

#3
March 29, 2009 at 06:39:51
I figured it out, inv.txt had too much data haha :P something like 20 thousand lines, I forgot that I was using the file that I diden't split up yet. Thanks for the help :)

Report •

Related Solutions


Ask Question