Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynazip...what order does it unzip files in
Message
From
15/11/2001 09:38:05
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00581955
Message ID:
00582026
Views:
20
Thanks Mark

My flag file does have meaningful data in it unfortunately. I regret this now butI have done too much code to change.

In the end I have decided to do it using the exclude method after all.

but still having some snags
.lZip_ExcFlag = .t && Items that match specs in cZip_ExcList are EXCLUDED from the operation
.cZip_ExcList = ["*.END" "*._END.TXT"]&& Separate each filespec with a space. Place "Quotes" around long filenames.
Does not seem to be be working

Here is my full piece of code
****** unZip Folder 
****** This function will decompres an encrypted zip file to a selected folder
****** Files matching '*_END.TXT' or '*.END' will be unzipped last

lparam lcZipFile,lcTargFolder

local oDZ
oDZ = newobject('dynazip', 'dynazip.fxp')
with oDZ
	.cUnz_ZipFile         = lcZipFile
	.cUnz_FileSpec        = "*.*"
	.cUnz_Destination     = lcTargFolder
	.lZip_ExcFlag = .t.			&& Items that match specs in cZip_ExcList are EXCLUDED from the operation
	.cZip_ExcList = ["*.END" "*._END.TXT"]	&& Separate each filespec with a space. Place "Quotes" around long filenames.

	********* delete this bit after testing
	.lUSO_LogZipResults = .t.
	.lUSO_LogZipResults =.t.
	***************************************
	.lUSO_ExternalProg    = .t.
	.lUnz_CryptFlag = oApp.EncryptPackets		&& Use the value [password] in cUnz_CryptCode to determine if the item has a matching
								** password before extracting.
	.cUnz_CryptCode = oApp.EncryptKey 	&& The decryption code [password] used only if lUnz_CryptFlag is TRUE
	
	SET STEP ON
	llRetVal=.UnzExtract()
	
	*** Ok now unzip the end_of_send file - Files of this type must always be extracted last
	
	.cUnz_FileSpec        = ["*.END" "*._END.TXT"]
	.lZip_ExcFlag = .f.			&& Items that match specs in cZip_ExcList are EXCLUDED from the operation
	.cZip_ExcList = ""			&& Separate each filespec with a space. Place "Quotes" around long filenames.

	llRetVal=.UnzExtract()
	
	
endwith
oDZ.Release()
clear dlls
return llRetVal
>Since you do not like the exclude method proposed by Lloyd --
>
>Unless your flag file has meaningful data in it, you could just not include the flag file in the ZIP file or not extract it from the zip file. After the unzip operation is complete, just create the flag file yourself.
>
>>I am writing an application that uses Dynazip to unzip a collection of files.
>>
>>It is important that one of the files is always the last one to be unzipped since another application checks for the existance of this file to see if Dynazip has finished delivering all the files.
>>
>>Looking at the log Dynazip produces when it unzips I can see no logical order. It does not seem to sort them by file name, date-time, or size.
>>
>>I can probably solve the problem by renaming my "End_of_Send.TXT" file to something else before its zipped and then renaming it after it has arrived but I would like to avoid this.
>>
>>All help gratefully received.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform