パラメータが無効な場合に使用法を表示するバッチがあります。
例のために。
Running "sample.bat update fuh"
:usageactions
set actions=%*
set toremove=update
set todisplay=%actions:%toremove% =%
echo Error: Invalid Arguments - '%todisplay%'.
echo Type sample.bat %toremove% -h for usage.
期待される出力:
Error: Invalid Arguments - 'fuh'.
Type sample.bat update -h for usage
しかし、私の出力は次のとおりです。
Error: Invalid Arguments - 'update'.
Type sample.bat update -h for usage
どのようにそれを達成しましたか?どんな助けでも大歓迎です。ありがとう。
(ちなみに、質問がわかりにくい場合は、質問を変更してください。)