Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Zip files
Message
De
29/03/2022 11:18:22
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
29/03/2022 10:48:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01684018
Message ID:
01684021
Vues:
51
>Hello all,
>
>I have this code to zip files
>
>cFileZip = "C:\temp2\D401001F.ZIP"
>cSource = "c:\temp1\"
>strtofile(chr(0x50)+chr(0x4B)+chr(0x05)+chr(0x06)+replicate(chr(0),18),cFileZip) && Créer un fichier zip
>o=CREATEOBJECT("shell.application")
>FOR EACH ofile IN o.NameSpace(cSource).items
> o.NameSpace(cFileZip).copyhere(ofile)
>ENDFOR
>
>I would like to have the possibility to pick one by one, the files that should go in my zip file.
>
>Can I modify that code or do I need to do it another way? If another way you can provide code?

Just to let you know. This is code with good chances to fail. Doug run into this with Thor on my comp. You assume that the user uses the M$-build-in compression. This must not be true.
Either try-catch or check http://www.sevenforums.com/tutorials/13619-zip-folders-enable-disable-windows-explorer-view.html
to learn what registry entry to read.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform