Here I show help if no switch is selected. Also the last line shows how to test for a specific parameter (/ud
but you can change it to -?
and /?
)
If not "%1"=="" goto main
echo Filter.bat
echo ==========
echo The Filter program is a vbs file for searching, replacing, extracting, and
echo trimming console output and text files.
echo.
echo Filter.bat makes Filter.vbs easily usable from the command line. It
echo controls unicode/ansi support and debugging.
echo.
echo Type Filter /? for more information.
echo.
cscript //nologo "C:\Users\David Candy\Desktop\Filter.vbs" menu
Goto :EOF
:Main
Rem /ud Unicode and Debug
If %1==/ud FOR /F "tokens=1*" %%i IN ("%*") DO cscript "C:\Users\David Candy\Desktop\Filter.vbs" //nologo //u //x %%j&Goto :EOF