Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code

Meaning

Detail

200

SUCCESS

Completed with results

204

NO CONTENT

Completed, but there were no results, so no output file

400

BAD REQUEST

There was a problem with your command

500

INTERNAL ERROR

Something went wrong

In additionaaddition, the last two lines in the output contain the final job status, and the location of the output file (if any) on disk.

...

Code Block
breakoutModewide
languagebash
rem Example Windows batch file

rem run the command:
"C:\Program Files\Price Checker 2\pc2cmd.exe" -silent -auto "C:\MyFile.xlsx"

rem When complete the exit code will be accssibleaccessible in the %errorlevel% variable
if %errorlevel%==200 (
   echo "Success"
) else if %errorlevel%==204 (
   echo "Suceeded, but no output file was created."
) else if errorlevel 400 (
   echo "There was a problem with your command."
) else (
   echo "Internal error - Something went wrong"
)

...

Code Block
breakoutModewide
languagebash
#!/usr/bin/sh

# This is an example shell script for MacOS

# Run the command:
"/Applications/Price Checker 2.app/Contents/Resources/app/pc2cmd" /Users/Me/Documents/MyFile.xlsx

# When complete the exit code will be acecssibleaccessible via the $? variable
exitcode=$?
if [ $exitcode == 200 ]
then
  echo "Success"
elif [ $exitcode == 204 ]
then
   echo "Suceeded, but no output file was created."
elif [ $exitcode == 400 ]
then
   echo "There was a problem with your command."
else
   echo "Internal error - Something went wrong"
fi

...