Welcome to PcCare.com
Command line scripts stop executing when they encounter an invalid command. For example:
echo test | sortz 1> out.txt 2>&1
Sort is spelled incorrectly and the cmd file stops executing. It may be desireable at times to test whether a command is avalable without terminating the script. The following code tests for sorta availability and reports an error if not.
echo test | cmd /q /k"sorta" 1> out.txt 2>&1 |
Please review our Terms of Service and Privacy statement before initiating service or using this site. Microsoft® and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. PcCare Site Map. About Us