[EpiData-list] Backup Command working twice ...

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sat May 16 04:21:59 CDT 2009


The backup command can only be used one time. The strategy to get copies 
in two places could be:

a.. Make a zip file to one place
BACKUP F:\backup\distinationdirectory ZIP myzipfile.zip

b. run a command to copy the file to your second place.
execute copy f:\backup\folder\myzipfile.zip c:\backupfolder\myzipfile.zip

The whole block is then:
after file
BACKUP F:\backup\distinationdirectory ZIP myzipfile.zip
execute copy "f:\backup\folder\myzipfile.zip c:\backupfolder\myzipfile.zip"
end

The problem arises that apparently the parsing of the command "copy" is 
not understood by windows. So unless entry is changed or some 
experimentation finds out how to formulate the execute line such that 
the copy can be executed we need a different strategy.

How about this one:
a.
after file
BACKUP F:\backup\distinationdirectory ZIP myzipfile.zip
quit
end

b create the file start.cmd (or start. bat) with two lines:
c:\programme\epidata.exe "c:\myfolder\subfolder\datafile.rec"
copy "f:\backup\folder\myzipfile.zip c:\backupfolder\myzipfile.zip"

By starting the entry with the file start.cmd you then have the double 
backup principle

A strong feature of the backup command is to use the date as part of the 
name of the zip file. This would need some thinking to get the name as 
part of the copying. Some hints on this is in the help file of entry in 
chk command execute. The command processor epic.exe available from 
www.epidata.dk would also do this instead of pkzip

after file
define tmpz _____________________________
BACKUP c:\temp\
help “Create zip file ? 1:yes 2:no ” keys=”12” type=CONFIRMATION
if resultvalue = 1 then
let tmpz = string(day(today))
if month(today) < 10 then
tmpz = tmpz + "0" + string(month(today)) + string(year(today)) + ".zip"
else

tmpz = tmpz + string(month(today))+ string(year(today))+ ".zip c:\temp\*.*"
endif
endif
execute pkzip "@tempzip -r -u" wait hide
END

regards
Jens Lauritsen
EpiData Association


More information about the EpiData-list mailing list