Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Zipping a directory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01424198
Message ID:
01424214
Vues:
50
>>Hi
>>
>>I've been down this road before but have lost my code and need a solution in a hurry
>>
>>Anyone have a really simple prg for zipping up a directory?
>>
>>Thanks
>>
>>Colin
>
>Check Zipping files from inside VFP Thread #1222560

Naomi - I simplified the code as follows and it works a treat

lcDataPath='o:\swedvfp\vfp\'
lcZipFileName="o:\zips\colin.zip"
strtofile(chr(0x50)+chr(0x4B)+chr(0x05)+chr(0x06)+replicate(chr(0),18),lcZipFileName)
oShell=CREATEOBJECT("shell.application")
FOR EACH ofile IN oShell.NameSpace(lcDataPath).items
WAIT WINDOW "Archiving File: " + oFile.Name + ' to ' + lcZipFileName NOWAIT
oShell.NameSpace(lcZipFileName).copyhere(ofile)
ENDFOR
WAIT clear

Thanks as always
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform