如果您的参数无效,我有一批会显示用法。
例如。
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
如何实现它?任何帮助,将不胜感激。谢谢。
(顺便说一句,如果问题如此混乱,请修改问题。)