473,382 Members | 1,424 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Winzip (wzzip.exe) via access

Hi

I am using the following code to zip up a selected folder but it
doesn't work and I get the msg saying the file doesn't exist but it
does exist, please help - thanks

---[code]---

Set objFSO = CreateObject("Scripting.FileSystemObject")

sTempZipFolder = "c:\Temp"
sFileName = Me.txtFileToZipAttach.Value
sZipName = sTempZipFolder & "\Reports.zip"

If objFSO.FileExists(sFileName) Then
MsgBox sFileName & " exists"
Set objShell = CreateObject("WScript.Shell")
Set objCmd = objShell.Exec("C:\Program Files\WinZip\wzzip.exe
-ybc" & " " & sZipName & " " & sFileName, 1, True)
Set objCmd = Nothing
Set objShell = Nothing

Else
MsgBox sFileName & " doesn't exist"

End If

---[code]---
Nov 13 '05 #1
2 3370
mr_ocp wrote:
Hi

I am using the following code to zip up a selected folder but it
doesn't work and I get the msg saying the file doesn't exist but it
does exist, please help - thanks

---[code]---

Set objFSO = CreateObject("Scripting.FileSystemObject")

sTempZipFolder = "c:\Temp"
sFileName = Me.txtFileToZipAttach.Value
sZipName = sTempZipFolder & "\Reports.zip"

If objFSO.FileExists(sFileName) Then
MsgBox sFileName & " exists"
Set objShell = CreateObject("WScript.Shell")
Set objCmd = objShell.Exec("C:\Program Files\WinZip\wzzip.exe
-ybc" & " " & sZipName & " " & sFileName, 1, True)
Set objCmd = Nothing
Set objShell = Nothing

Else
MsgBox sFileName & " doesn't exist"

End If

---[code]---


Try using:
If Len(Dir$(sFileName)) Then
....
--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 13 '05 #2
mr****@hotmail.com (mr_ocp) wrote in message news:<7e**************************@posting.google. com>...
Hi

I am using the following code to zip up a selected folder but it
doesn't work and I get the msg saying the file doesn't exist but it
does exist, please help - thanks

---[code]---


Phil Stanton does something similar in a recent post:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=40e98d63%240%24111%2465c69314%40mercury.nil dram.net

James A. Fortune
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James Baker | last post by:
I'm using ASP and I need to generate a ZIP file that contains a list of files that I'm pulling from a database. I've determined WinZip's command line parameters so that I can use it, the problem...
10
by: Steve | last post by:
Is there anyone with experience using the Winzip command line add-in? I can't get it to create the zip file with a space in the file name. Using: RetValue = Shell("C:\winzip\wzzip.exe...
3
by: Sam | last post by:
Hi, I'm trying to create a self-extracting zip file from a zip file that contains the install for a distributed access application. The problem is that when I run it, I get a message saying...
2
by: Jim | last post by:
I all, I have a database on a user's network drive with the following path: E:\NewDB\StatsData.mdb I want to create a small "Utilities" database that the user can launch which will run WinZip...
3
by: Rob | last post by:
No way this should be that difficult... I have a program that does a file watch on a folder. When a file is created in this folder, I simply want to zip it up using WinZip (with the command...
15
by: Karl | last post by:
Hi all, I regularly use FTP to place Self Extracting Zip files on the web for remote users to update their datafiles. Works very nicely. I have automated the creation of the initial zip file (...
1
by: hannahg | last post by:
I am trying to incorparate the win zip command line processor in my code on an Access 2003 database form. The code that I downloaded made a call to the windows api. It requires that you use short...
3
by: learningvbnet | last post by:
Hi, I am trying to extract zipped files using Winzip in my VB.net application and I ran into 2 stone walls. 1. How do you handle file names with spaces. See psiProcess.Arguments For...
0
by: yugho | last post by:
I'm sorry if I post Winzip question here, but I met a problem. I was running Winzip command by using process in VB.Net, but I had error that I don't know how to trace. 1. I create a batch file:...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.