Home Page
        Orders     Downloads     Support     Contact     Deutsch
ZOC Terminal is a professional SSH Client and Terminal Emulator for Windows and macOS.
PyroBatchFTP Online Help Topic:

Scripting Methods → Resultcodes/Logfile

Each command in a script generates a result code and an optional explanation. Result codes are categorized in the following ranges:

100-199 : Intermediate result, eventually followed by an final resultcode of 200 or higher.
200-299 : Successful operation
400-499 : Temporary failure of operation (e.g. phone busy)
500-599 : Fatal faliure (e.g. file not found, number not available, etc)

Any result code higher than 299 will normally terminate the script. However, if you want to continue with a script, regardless of a certain command's result, you can either use the OnError command or prefix a single command with a dash ("-") to ignore a potential error. (This will override the current OnError setting.)
 

// download file and rename potentially existing file to articles.bak
// (delete/rename will fail if files not there)
LocalChDir c:\downloads
-LocalDelete articles.bak
-LocalRename articles.dat articles.bak
Get articles.dat

All commands and their result codes will be listed in the log file. Since log files will often be analyzed by other applications, log file entries are clearly structured:

ssss.tt - cxxxxxxxxxxxxxxxxxxxxxxxx
4 digits time in seconds since starting the program
a decimal point
two digits 1/100 seconds
two space characters
a dash character
two space characters
one class-character of "%", "$" or "#"
more data depending on the class of entry

There are three classes of logfile entries:
% : Informational (date, time, script name, computer generated commands, etc)
$ : Executed command (the commands from your script)
# : command results (followed by the three digit result code)

Here is a typical example:


 

0000.00 - % 2000-11-05 17:19:12
0000.00 - % Attempting to start pyro.cmd
0000.00 - $ Connect 770308 markus asdf
0002.00 - #200 OK
0002.00 - $ LocalChDir e:\t
0002.00 - #200 OK
0002.01 - $ -LocalDelete blub.cmd
0002.01 - #200 OK
0002.01 - $ -LocalDelete blub.xxx
0002.01 - #200 OK (ignoring error "#500 Operation failed")
0002.01 - $ Get test.fil blub.cmd
0004.02 - #200 OK
0004.02 - $ -RemoteDelete newfile.gif
0004.03 - #200 OK
0004.03 - $ -RemoteDelete newfile.gif
0004.05 - #299 / 500 EUROFILE: Can't delete file (error ignored)
0004.05 - $ PutMove fileopt.gif newfile.gif
0006.07 - % LocalDelete fileopt.gif
0006.07 - % LocalDelete returns #200 OK
0006.08 - #200 OK
0006.08 - $ Disconnect
0008.08 - #200 OK
0008.08 - % pyro.cmd ended - last result was:
0008.08 - % #200 OK

 
← Back to Scripting Methods

 

Downloads
Orders
Contact
Support
Terms of Use
Privacy Policy
pixel