[EpiData-list] Backup command: make routine snapshots without replacing previous backup (TIME STAMP?)

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sun Oct 19 20:46:00 CDT 2008


With sufficient patience and testing any name structure can be given for 
a backup file. Here shown with calling of the external file epic. Some 
adaptation of the command line is necessary, which is why the backup 
command was developed.

This block will ask whether to create a zip file with the name of todays 
date using an external application epic.exe
 - it can be a little (often quite) tedious to work out the parameters 
to execute, but do so first in a command window outside epidata entry.

Include in the chk file this "after file" block, which names the zip 
file by date, hour and minute:
 
after file
  help "Create zip file ? 1:yes  2:no" keys="12" type=CONFIRMATION
  if resultvalue = 1 then
 define tmpz _________________________________________________
    let tmpz = "zip c:\temp\first"+string(day(today))
    if month(today) < 10 then
      tmpz = tmpz +  "0" + string(month(today)) + string(year(today)) + 
string(Num2Time(Now)) + " replace first.*"
    else
      tmpz = tmpz + string(month(today))+ string(year(today)) +  
string(Num2Time(Now)) +" replace first.*"
    endif
     help @tmpz
   execute epic "@tmpz" wait
  endif
END

Regards
Jens Lauritsen



More information about the EpiData-list mailing list