Hello All,

I'm trying to write a class that wraps up the functionality of Craig
Boyd's VFPCompression.fll.  I'm writing a method for zipping up folders
and I'm having trouble to get ZipFolder() to work when I specify another
target folder for ZipOpen().  If I create the zip file in the current
directory, everything works fine.  If I specify another folder for my
target zip file, the zip file is created, but the ZipFolder() call
returns .T. but nothing is zipped.  Anyone solve this problem or see
where I've gone wrong?

&& Here's the code.
tcFolderName = [c:\temp]
tcTargetFile = [c:\backup\temp.zip]
tlIgnorePaths = .F.
lcTargetFile = JUSTFNAME(tcTargetFile)
lcTargetDir = ADDBS( FULLPATH( JUSTPATH(tcTargetFile)) )
&& lcTargetDir = []   && This works in creating zip in curdir
lcPassword = []
                        
IF ZipOpen( lcTargetFile, lcTargetDir )
  IF EMPTY(lcPassword)
    llRetVal = ZipFolder(tcFolderName, tlIgnorePaths)
  ELSE
    llRetVal = ZipFolder(tcFolderName, tlIgnorePaths, lcPassword)
  ENDIF
  IF NOT ZipClose()
    THIS.SetError("Could not close the zip file: " + tcTargetFile)
  ENDIF
ELSE
  THIS.SetError("Could not open the zip file: " + tcTargetFile)
ENDIF

-- 
-Kevin
CULLY Technologies, LLC



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to