Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Craig Boyds vfpcompression.fll / ignore sub-folders
Message
 
 
À
27/07/2014 16:25:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01604787
Message ID:
01604827
Vues:
113
>I have just started looking at VFPCompression.
>
>It appears that if you zip a folder it includes all sub-folders as well. Is there any way to specify that it zips the files but ignores the sub-folders?

As a workaround you could add the files one by one to the zip archive. Create a collection of the files in the folder and you can do something like this:
LPARAMETERS toFiles AS cCollection OF aBasicGen, ;
		tcZipFile, tcPassword
*
LOCAL llRetVal
llRetVal = ZipOpen(tcZipFile)
*
IF llRetVal
	*
	FOR EACH lcFileName IN toFiles
		IF VARTYPE(tcPassword) = "C"
			llRetVal = ZipFile(lcFileName, .T., tcPassword)
		ELSE
			llRetVal = ZipFile(lcFileName, .T.)
		ENDIF
	ENDFOR
	*
	ZipClose()
	*
ENDIF
*
RETURN llRetVal
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform