Backup Command working twice ...
Hello I use the command for copy the REC file, AFTER FILE BACKUP C: \ backup \ HPH END and it works very well.
But I need to add other directories in this BACKUP simultaneously (F: \ backup \ HPH) and (C: \ backup \ HPH ) How can I run this command twice? In the same CHK. 1 .- I tried: AFTER FILE BACKUP C: \ backup \ HPH BACKUP F: \ backup \ HPH END It does not work (1 .-)
2 .- I tried AFTER FILE BACKUP C: \ backup \ HPH END
AFTER FILE BACKUP F: \ backup \ HPH END It does not work (2 .-)
How can I do? I appreciate your prompt response
Greetings, I write from Chile South America
Carlos Ortega Areyte Biostatistician
Hello I use the command for copy the REC file, AFTER FILE BACKUP C: \ backup \ HPH END and it works very well.
But I need to add other directories in this BACKUP simultaneously (F: \ backup \ HPH) and (C: \ backup \ HPH ) How can I run this command twice? In the same CHK. 1 .- I tried: AFTER FILE BACKUP C: \ backup \ HPH BACKUP F: \ backup \ HPH END It does not work (1 .-)
2 .- I tried AFTER FILE BACKUP C: \ backup \ HPH END
AFTER FILE BACKUP F: \ backup \ HPH END It does not work (2 .-)
How can I do? I appreciate your prompt response
Greetings, I write from Chile South America
Carlos Ortega Areyte Biostatistician
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
participants (1)
-
epidata-list@lists.umanitoba.ca