1.

Solve : %1-12 problems?

Answer»

I'm having one file start another file with check parameters to prevent the second file from being opened with out  running the first but EVEN when i run the the first the second still comes up withe the same error message
the start command Code: [Select]start test2.bat %CD% %key1% 1234 %key2% 5678 %key3% 9012 %key4% 3456 i like cheese
check code Code: [Select]IF not "%3"=="1234" goto error1
IF not "%5"=="5678" goto error1
IF not "%7"=="9012" goto error1
IF not "%9"=="3456" goto error1
IF not "%10"=="1" goto error1
IF not "%11"=="like" goto error1
IF not "%12"=="cheese" goto error1
In test2.bat:

test2.bat=%0
%cd%=%1
%key1%=%2
1234=%3
%key2%=%4
5678=%5
%key3%=%6
9012=%7
3456=%8
i=%9
-----
like=%10
cheese=%11

I don't know if anything below ----- can actually work.i guess i have to get rid of i like cheese  Well, you can always see if it works.You can only use SINGLE digits for passed parameters and %0 is reserved so you just have %1 to %9 to play with. But you have the SHIFT command.



Discussion

No Comment Found