Quantcast
Channel: CobianSoft
Viewing all articles
Browse latest Browse all 4242

Cobian Reflector • I pass the @ERRORS variable as a parameter in Post-Backup events to a .BAT and it always returns 0. Instead, by email th

$
0
0
I pass the @ERRORS variable as a parameter in Post-Backup events to a .BAT and it always returns 0. Instead, by email the %ERRORS variable sends the correct number of errors.

For example:
I configure the backup.
And in Post-Backup events, I run a "copy_variable_to_a_file.bat" that sends the parameter "%ERRORS"

"copy_variable_to_a_file.bat" is a small script that takes the first parameter that is sent to it, and with that parameter it saves it to a file "myFile.txt"

I rename the source folder in the operating system, so that it does not exist, and it gives an error.

I run the Cobian Reflector program

And indeed, Cobian detects an error, because the source folder is not there.

And it correctly sends me an email with the error.

But, but, here comes the error detection,
it turns out that the file that I create "myFile.txt" always has this "0"

It should be noted that if I pass another variable to the .BAT file, such as "%LOCALSETTINGS" in quotes, it sends it to me correctly.

However, if I pass the %ERRORS variable to the .BAT file, it always sends me "0" even if it has errors, and they do appear in the email if I put the %ERRORS variable in the email

Please fix it if you are so kind

Thanks, friend

Statistics: Posted by streik — 17 Aug 2024, 16:30



Viewing all articles
Browse latest Browse all 4242

Trending Articles