RoadRunnerOz
Programmer
Sawzip now allows disk spanning (SawzipNG)
See
I got this far. It works with backing up to the harddrive but disk spanning will fill the first disk then "stall".
I figured out when it appears to stall, removing then adding another disk continues the process & renumbers the disk.
There's no way I would trust an end user to run this way.
Any ideas anyone???
This is my modified code from the above faq
LOCAL cZipfile, cBackupPath,cRestorePath, cMask
cZipfile = "a:\"+ SUBSTR(SYS(2015), 4) + ".zip"
* ADDBS(SYS(2023)) + "_"+SUBSTR(SYS(2015), 4) + ".zip" && Zip will be in your Windows Temp Directory
cMask = "*.*"
cBackupPath = GETDIR("C:\","Select directory to backup","BACKUP DIRECTORY?",64)
cRestorePath = GETDIR("C:\","Select where to restore","RESTORE DIRECTORY?",64)
IF !DIRECTORY(cBackupPath) OR !DIRECTORY(cRestorePath)
MESSAGEBOX("Both a backup directory and a restore directory must be selected",16,"Missing directory"
RETURN
ENDIF
*!* ZIPPING WHOLE DIRECTORY
WAIT WINDOW "BACKING UP FILES WITH PROGRESS INDICATION... ONE MOMENT PLEASE" NOWAIT
oSAWArchive = CREATEOBJECT("SAWZipNG.Archive"
oSAWArchive.Create(cZipfile,1) && 1 allows disk spanning
Local lcPath, cZippedFile, nProgressValue, nProgressMax
cZippedFile = Sys( 2000,cBackupPath+cMask)
nProgressMax=ADIR(aryFiles,cBackupPath+cMask)
RELEASE aryFiles
nProgressValue= 1
oSAWArchive.TempPath=sys(2023) &&
Do While !Empty( cZippedFile )
LcSAWFile = cBackupPath+cZippedFile
nProgressComplete = INT(nProgressValue/nProgressMax*100)
sMessage = "BACKING UP: " + TRANSFORM(nProgressComplete)+"% " + Replicate("|",INT(nProgressComplete/2))
set message to sMessage
oSAWArchive.Addfile(lcSAWFile)
LcSawFile = ""
cZippedFile = Sys( 2000,cBackupPath+cMask,1)
nProgressValue = nProgressValue + 1
Enddo
oSAWArchive.close
oSAWArchive = .NULL.
WAIT CLEAR
MESSAGEBOX("Backup Completed"
set message to
RETURN
Michael Ouellette
mouellette@tpg.com.au
See
I got this far. It works with backing up to the harddrive but disk spanning will fill the first disk then "stall".
I figured out when it appears to stall, removing then adding another disk continues the process & renumbers the disk.
There's no way I would trust an end user to run this way.
Any ideas anyone???
This is my modified code from the above faq
LOCAL cZipfile, cBackupPath,cRestorePath, cMask
cZipfile = "a:\"+ SUBSTR(SYS(2015), 4) + ".zip"
* ADDBS(SYS(2023)) + "_"+SUBSTR(SYS(2015), 4) + ".zip" && Zip will be in your Windows Temp Directory
cMask = "*.*"
cBackupPath = GETDIR("C:\","Select directory to backup","BACKUP DIRECTORY?",64)
cRestorePath = GETDIR("C:\","Select where to restore","RESTORE DIRECTORY?",64)
IF !DIRECTORY(cBackupPath) OR !DIRECTORY(cRestorePath)
MESSAGEBOX("Both a backup directory and a restore directory must be selected",16,"Missing directory"
RETURN
ENDIF
*!* ZIPPING WHOLE DIRECTORY
WAIT WINDOW "BACKING UP FILES WITH PROGRESS INDICATION... ONE MOMENT PLEASE" NOWAIT
oSAWArchive = CREATEOBJECT("SAWZipNG.Archive"
oSAWArchive.Create(cZipfile,1) && 1 allows disk spanning
Local lcPath, cZippedFile, nProgressValue, nProgressMax
cZippedFile = Sys( 2000,cBackupPath+cMask)
nProgressMax=ADIR(aryFiles,cBackupPath+cMask)
RELEASE aryFiles
nProgressValue= 1
oSAWArchive.TempPath=sys(2023) &&
Do While !Empty( cZippedFile )
LcSAWFile = cBackupPath+cZippedFile
nProgressComplete = INT(nProgressValue/nProgressMax*100)
sMessage = "BACKING UP: " + TRANSFORM(nProgressComplete)+"% " + Replicate("|",INT(nProgressComplete/2))
set message to sMessage
oSAWArchive.Addfile(lcSAWFile)
LcSawFile = ""
cZippedFile = Sys( 2000,cBackupPath+cMask,1)
nProgressValue = nProgressValue + 1
Enddo
oSAWArchive.close
oSAWArchive = .NULL.
WAIT CLEAR
MESSAGEBOX("Backup Completed"
set message to
RETURN
Michael Ouellette
mouellette@tpg.com.au