Skip to main content

Batch Script (.bat)

icon
Batch Script (.bat)

Allows you to execute a batch (.bat) script in a Windows environment.

Code

The code of the BAT script to execute. Variables can be used in this script and will be replaced before executing

REM This is a template batch file

REM Replace {file.FullName} and {file.Orig.FullName} with actual values
SET WorkingFile={file.FullName}
SET OriginalFile={file.Orig.FullName}

REM Example commands using the variables
echo Working on file: %WorkingFile%
echo Original file location: %OriginalFile%

REM Add your actual batch commands below
REM Example: Copy the working file to a backup location
REM copy "%WorkingFile%" "C:\Backup\%~nxWorkingFile%"

REM Set the exit code to 0
EXIT /B 0

Exit Codes

NumberDescription
1+Specifies which output is to be called. Define the number of outputs using the Outputs field. This will add more output connections to the flow element.
0Completes the flow successfully. This will immediately stop the flow and mark it as successful.
otherIf a number is returned that is outside the range of defined outputs, this will mark the flow as unsuccessful.