.


( ) - 2


:

Variables: NUM = 1; Rights: Everyday ( time = 12:00 ) { if ( CWEEKDAY() == Sun ) { /* New archive on Sunday */ move (FILENAME + TOSTR(NUM) + .lhb , c:\arc ); NUM =NUM +1; backup ( s u +NAME +/ +PASSWORD + f +FILENAME +TOSTR(NUM) +.lhb startinc ); } else /* Incremental backup */ backup ( s u + NAME + / + PASSWORD + f + FILENAME + TOSTR(NUM) + .lhb inc ); Exception: /* for everyday */ print(Error= +TOSTR(ERROR) + , LinError= +TOSTR(LINERROR) + , SysError= +TOSTR(SYSERROR) ); stop; } Special: before { /* just after the start */ print ( Start backup system ); backup(s u + NAME + / + PASSWORD + f + FILENAME + TOSTR(NUM) + .lhb startinc ); } after { /* after stop or Ctrl-C */ print ( Stop backup system ); if ( ERROR != 0 ) logprint ( Error present: + TOSTR(ERROR) ); } iferr { /* global */ print(Error = + TOSTR(ERROR) + , LinError= +TOSTR(LINERROR) + , SysError= +TOSTR(SYSERROR) ); stop; }