|
Answer» 1. Is the batch file in the same folder as the smc file?
2. Change this line
for /f "TOKENS==" %%a in ('dir *.smc /a-d /b /s') do set var=%%a
3. Why are you doing COMP %%a? the variable %%a does not exist any more. (The loop is finished), and anyway, you have assigned its value to %var%.
oh, alright i solved it!
my code: FOR /F "tokens=1*" %%G IN ('dir /b *.smc') DO Set smc=%%G If [%smc%]==[] goto filenotfound COMP %smc% valid.c1 /d
but now i have a question about the COMP, if there are MISMATCHES, how do i make is JUMP(goto) somewhere else?Quote from: kaiyoken on July 23, 2008, 02:33:26 PM COMP %smc% valid.c1 /d
but now i have a question about the COMP, if there are mismatches, how do i make is jump(goto) somewhere else?
COMP %smc% valid.c1 /d || goto notsame
But why not use fc>nul (no messages or need to PRESS a key)
FC %smc% valid.c1 /d>nul || goto notsame
|