Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Suppress Error Code 1 Result from "Run Command" Tool

PaulJunior
5 - Atom

Hi,

 

Is there any way to suppress/ignore a specific error code result when running the "Run Command" tool? I ask because I have a workflow that creates and runs a BAT file, and the BAT file runs the Robocopy tool to copy folders/files from one location to another.

 

The workflow works reliably and correctly, but the "Run Command" tool returns an error message that can be misinterpreted as a legitimate error by the end user. Although, as you'll see below, this error code is simply indicating that the program ran correctly.

 

Common Robocopy "error" codes that are largely informational (reference: https://ss64.com/nt/robocopy-exit.html) :
1 - One or more files were copied successfully (that is, new files have arrived).
2 - Some extra files or directories were detected.
4 - Some mismatched files or directories were detected.

 

Kind regards,

 

Paul

PaulJunior_0-1642623902674.png

 

 

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @PaulJunior 


Could you use some error handling in the script itself?

 

In the link you posted it seems there are a couple of options to avoid getting the exit errors.

 

Cheers,

PaulJunior
5 - Atom

Thank you, Thableaus.

 

I've added this code to the end of the script to curtail Alteryx flagging the frequently occurring and normal result of "error code 1:

^& IF %ERRORLEVEL% LEQ 1 exit 0

 

 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels