Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zipping Re: Sawzip faq184-3830

Status
Not open for further replies.

RoadRunnerOz

Programmer
Aug 22, 2000
128
AU
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top