Page 1 of 1

Set Var not working

Posted: 13 Apr 2010 08:57
by radcaesar
In the below file, filecount.txt have count "20" but the variable "varFilecount" shows "0" when echo.

Any Idea?

dir "c:\MCSLoad\*.txt" | find /c ".txt" >> filecount.txt
set /P varFileCount=<filecount.txt
echo varFileCount
REM del filecount.txt

Re: Set Var not working

Posted: 13 Apr 2010 09:03
by !k
echo %varFileCount%

Re: Set Var not working

Posted: 13 Apr 2010 09:05
by radcaesar
oops..... I don't know how i missed it out.

Thanks.