Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynazip problem
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00405104
Message ID:
00405489
Views:
15
>Hello everybody,
>
>Got a small problem with Dynazip which I can't solve even after applying RTFM rule <g>
>
>I want to zip the content of folder, so I assign to Itemlist property something like [d:\projects\faw\data\*.*] and start zipping. Everything is allright but it stores full directory structure into ZIP file. but I want to create ZIP without any path stored inside...
>Well, I discovered two properties Nodirectorynames and NodirectoryentriesFlag that supposed to create ZIP file without path information. Nonetheless, it continues to create zip file with full path structure...
>
>Could anyone tell me how to fix this?
>
>
>TIA
>
>Best regards,
>Vladimir

I zip up my data directory every night with the following:

tcFullPathToZipFile = 'K:\VFAPPS\CODE40\UPDATES\MICRAPOINT\DATA.ZIP'
tcFullpathToItemList = 'K:\VFAPPS\MICRAPOINT\DATA\*.*'
tlDontStorePathInZip = .T.
tcThermometerTitle = 'ZIPPING THE LOTCARD DATA DIRECTORY'

* Turn off blender action
.ActionDZ = ZIP_NOACTION

* Set the name of the Zip file
.ZipFile = ALLTRIM(tcFullPathToZipFile)

* Set the items we are zipping
.ItemList = tcFullpathToItemList

* Tell the zip control not to store the path
* of the items in the zip file
.NoDirectoryNamesFlag = tlDontStorePathInZip

* Set the thermometer title
.ExtProgTitle = ALLTRIM(tcThermometerTitle)

* Lets use the thermometer included with the DynaZip-AX
.ZipSubOptions = ZSO_EXTERNALPROG+ZSO_EXTPROGCANCEL

* Tell the zip control to add
.ActionDZ = ZIP_ADD

* Check for success of the zip
llSuccess = (.ErrorCode = ZE_OK)
IF llSuccess
llZipReturn = .T.
ELSE
llZipReturn = .F.
ENDIF


The above will only get a zip file with no path of just what is in the data directory. If there are directories under the data then I would include the flag:

* We want to recurse
.RecurseFlag = tlRecurseSubDirectories

If I did not want full path stored I would use the following:

* Tell the zip control not to store the path
* of the items in the zip file
.NoDirectoryNamesFlag = tlDontStorePathInZip
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Reply
Map
View

Click here to load this message in the networking platform