I like to have a typical \"usage:\" line in my cmd.exe scripts — if a parameter is missing, user is given simple reminder of how the script is to be used.
cmd.exe
Please use findstr
echo %cmdcmdline% | findstr /ic:"%~f0" >nul && ( pause >nul )
or
setlocal EnableDelayedExpansion . . echo !cmdcmdline! | findstr /ic:"%~f0" >nul && ( pause >nul ) . . endlocal
This is always worked...