Sorted it out using GOTO.
Thanks...
Search found 4 matches
- 13 Apr 2010 11:01
- Forum: DOS Batch Forum
- Topic: If check variable
- Replies: 2
- Views: 3906
- 13 Apr 2010 10:35
- Forum: DOS Batch Forum
- Topic: If check variable
- Replies: 2
- Views: 3906
If check variable
My varFileCount is 10, but the echo message not displayed.
Where am I missing? Please....
dir "c:\MCSLoad\*.txt" | find /c ".txt" >> filecount.txt
set /P varFileCount=<filecount.txt
del filecount.txt
if NOT %varFileCount% == 20(
echo File Count Not Match
)
Where am I missing? Please....
dir "c:\MCSLoad\*.txt" | find /c ".txt" >> filecount.txt
set /P varFileCount=<filecount.txt
del filecount.txt
if NOT %varFileCount% == 20(
echo File Count Not Match
)
- 13 Apr 2010 09:05
- Forum: DOS Batch Forum
- Topic: Set Var not working
- Replies: 2
- Views: 3611
Re: Set Var not working
oops..... I don't know how i missed it out.
Thanks.
Thanks.
- 13 Apr 2010 08:57
- Forum: DOS Batch Forum
- Topic: Set Var not working
- Replies: 2
- Views: 3611
Set Var not working
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