Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

zip not fully working

Status
Not open for further replies.

macca007

Programmer
May 1, 2004
86
GB
Hi all i am tryin to zip a folder but it does not seem to work.

The folder Path is C:\Documents and Settings\macca\My Documents\test2

the code am using is

sZipName = "C:\Reports.zip"
sFileName = "C:\Documents and Settings\macca\My Documents\test2"


Shell "C:\Program Files\WinZip\wzzip.exe -pr " & Chr(34) & sZipName & Chr(34) & " " & Chr(34) & sFileName & Chr(34)

am not sure if i got the full syntax right

cheers
 
Hi, I played around with this and the following works with the exception of the '-p' attribute, which I could not make work. I was using Winzip 8.1

szipname = "C:\Reports\TEST.zip" 'ZipFile Name
sfileName = "C:\Access\" 'Zip Folder
sZipLoc = "C:\Program Files\WinZip\WINZIP32" 'Winzip Location
Shell (sZipLoc & " -a -r " & szipname & " " & sfileName)

Hope that helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top