>>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 #
1222560Naomi - 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