PDA

View Full Version : Zip.Extract Help PLEASE


jcuster
11-05-2007, 10:54 AM
The problem is The Zip.Extract does not extract the file.

Ssrce = H:\BCKUP-<ASSETAG>\IE_Favorites
Sdest = Shell.GetFolder(6)

Note: I tried Sdest in many places.

Favfle = Ssrce.."Backup.zip"

--cycle and copy each file , calling callback function named: COPYCB1()

Zip.Extract(Favfle, {"*.*"}, Sdest, true, true, "", ZIP_OVERWRITE_NEWER, COPYCB1);
MDerror = Application.GetLastError()
if MDerror > 0 then
SetupData.WriteToLogFile(MDerror.." Error could not copy from the "..Sdest.."Backup.zip\r\n", true);
end



Zip.GetContents can see the file and Zip.Add created the file.

I don't see anything I'm doing wrong..

JXBURNS
11-05-2007, 11:02 AM
How about checking in more detail for the error rather than just whether there is an error at all?

if(nLastError ~= 0)then
Dialog.Message("Error",_tblErrorMessages[nLastError])
end
Has Sdest been defined somewhere?

What does COPYCB1 do and does it work correctly?

John

jcuster
11-05-2007, 11:12 AM
How about checking in more detail for the error rather than just whether there is an error at all?

if(nLastError ~= 0)then
Dialog.Message("Error",_tblErrorMessages[nLastError])
end
Has Sdest been defined somewhere?

What does COPYCB1 do and does it work correctly?

John

COPYCB1 reports progress to a pregress screen.

MDerror has returned no errors.

jcuster
11-05-2007, 11:51 AM
COPYCB1 reports progress to a pregress screen.

MDerror has returned no errors.

Thanks. I got it now by turning on extended errors in the log.

There was an error relating to the callback function.