diff --git a/BasicNodes/Scripting/BatScript.cs b/BasicNodes/Scripting/BatScript.cs index 9d0c5315..7a6497a6 100644 --- a/BasicNodes/Scripting/BatScript.cs +++ b/BasicNodes/Scripting/BatScript.cs @@ -24,11 +24,11 @@ public class BatScript : ScriptBase /// [Required] [DefaultValue(@" -REM A PowerShell script can communicate with FileFlows to determine which output to call next by using exit codes. -REM Exit codes are zero-based, so: -REM Exit Code 0 corresponds to Output 1 -REM Exit Code 1 corresponds to Output 2 -REM Exit Code 2 corresponds to Output 3 +REM A Batch script can communicate with FileFlows to determine which output to call next by using exit codes. +REM Exit codes are used to determine the output, so: +REM Exit Code 0 corresponds to Finish Flow +REM Exit Code 1 corresponds to Output 1 +REM Exit Code 2 corresponds to Output 2 REM and so on. Exit codes outside the defined range will be treated as a failure output. REM Replace {file.FullName} and {file.Orig.FullName} with actual values @@ -43,8 +43,8 @@ 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 +REM Set the exit code to 1 +EXIT /B 1 ")] [Code(2, "bat")] public override string Code { get; set; } diff --git a/BasicNodes/Scripting/PowerShellScript.cs b/BasicNodes/Scripting/PowerShellScript.cs index 96c35ecc..c5f8ca1b 100644 --- a/BasicNodes/Scripting/PowerShellScript.cs +++ b/BasicNodes/Scripting/PowerShellScript.cs @@ -26,10 +26,10 @@ public class PowerShellScript : ScriptBase [Required] [DefaultValue(@" # A PowerShell script can communicate with FileFlows to determine which output to call next by using exit codes. -# Exit codes are zero-based, so: -# Exit Code 0 corresponds to Output 1 -# Exit Code 1 corresponds to Output 2 -# Exit Code 2 corresponds to Output 3 +# Exit codes are used to determine the output, so: +# Exit Code 0 corresponds to Finish Flow +# Exit Code 1 corresponds to Output 1 +# Exit Code 2 corresponds to Output 2 # and so on. Exit codes outside the defined range will be treated as a failure output. # Replace {file.FullName} and {file.Orig.FullName} with actual values @@ -44,8 +44,8 @@ Write-Output ""Original file location: $OriginalFile"" # Example: Copy the working file to a backup location # Copy-Item -Path $WorkingFile -Destination ""C:\Backup\$([System.IO.Path]::GetFileName($WorkingFile))"" -# Set the exit code to 0 -exit 0 +# Set the exit code to 1 +exit 1 ")] [Code(2, "powershell")] public override string Code { get; set; } diff --git a/BasicNodes/Scripting/ShellScript.cs b/BasicNodes/Scripting/ShellScript.cs index 4ecb9653..9e4d70b7 100644 --- a/BasicNodes/Scripting/ShellScript.cs +++ b/BasicNodes/Scripting/ShellScript.cs @@ -25,10 +25,10 @@ public class ShellScript : ScriptBase [Required] [DefaultValue(@" # A Shell script can communicate with FileFlows to determine which output to call next by using exit codes. -# Exit codes are zero-based, so: -# Exit Code 0 corresponds to Output 1 -# Exit Code 1 corresponds to Output 2 -# Exit Code 2 corresponds to Output 3 +# Exit codes are used to determine the output, so: +# Exit Code 0 corresponds to Finish Flow +# Exit Code 1 corresponds to Output 1 +# Exit Code 2 corresponds to Output 2 # and so on. Exit codes outside the defined range will be treated as a failure output. # Replace {file.FullName} and {file.Orig.FullName} with actual values @@ -43,8 +43,8 @@ echo ""Original file location: $OriginalFile"" # Example: Copy the working file to a backup location # cp ""$WorkingFile"" ""/path/to/backup/$(basename \""$WorkingFile\"")"" -# Set the exit code to 0 -exit 0 +# Set the exit code to 1 +exit 1 ")] [Code(2, "sh")] public override string Code { get; set; } diff --git a/FileFlows.Plugin.dll b/FileFlows.Plugin.dll index 64d57a5e..70bfdaf2 100644 Binary files a/FileFlows.Plugin.dll and b/FileFlows.Plugin.dll differ diff --git a/FileFlows.Plugin.pdb b/FileFlows.Plugin.pdb index 5d78dff8..afcec2ec 100644 Binary files a/FileFlows.Plugin.pdb and b/FileFlows.Plugin.pdb differ