Comment detail

起動オプションの解析 (Nested Flatten)

This comment is reply for 7603 syat: バッチファイル。遅延環境変数展開で。 ...(起動オプションの解析). Go to thread root.

おっと、異常終了とか忘れてた。
バッチファイルの異常終了ってこんなんでいいのかな。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
46a47,53
>
> set /A COUNT=0
> for %%1 in (%ARGV%) do set /A COUNT += 1
>
> if not "%OPT_O%"=="ON" echo oオプションは必須です。 & exit /b 1
> if "%COUNT%"=="0"  echo パラメータは必須です。 & exit /b 1
>
52,54d58
< set /A COUNT=0
< for %%1 in (%ARGV%) do set /A COUNT += 1
<
63a68
> exit /b 0

Index

Feed

Other

Link

Pathtraq

loading...