473,766 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Winzip with VB.Net

1 New Member
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: "C:/zipbatch.bat" that contains below zip command
winzip32.exe -min -a -ex "C:/zipfile.zip" "C:/sourcefile.csv"

2. I create new a process to run the zip command
Dim t_process As New System.Diagnost ics.Process
t_process.Start Info.FileName = "C:/zipbatch.bat"
t_process.Start ()
t_process.WaitF orExit()
dim t_iExitCode as Integer = t_process.ExitC ode

3. Normally t_iExitCode will return 0 (zero) for a successful run. But I met a condition that the winzip return 0, but in fact it isn't totally successful.
The error message is that...
Winzip failed to rename the temp file into intended name, which is "C:/zipfile.zip"
So it happens that my file has been added to some "C:/ziptempfile.tmp ", but then failed to be added to "C:/zipfile.zip"

Is there anybody knows how to detect such kind of condition, since the process returns me "success". For now, I wish I could detect the failure first, so that I can stop my next process. Or if anybody knows how this kind of issue could happen, please tell me. Thanks a lot.
Jun 30 '09 #1
0 2738

Sign in to post your reply or Sign up for a free account.

Similar topics

6
6323
by: tdmailbox | last post by:
I developed an access database in access 2003(keeping my database in the access 2000 format). It has been fully tested to be access 2000 compatible and works great. I am trying to package the final version however and when I tell it to create a shortcut it includeds the path to access 2003 in the shortcut C:\Program Files\Microsoft Office\OFFICE11\ my client is running access 2000. I could not figure any way to change the access...
2
3265
by: Katie | last post by:
So I am Microsoft Access User, learning as I go. I need to send a database back to its author for some adjustments. For security and due to the size of this database I need to send it as a winzip file. I have attempted to send it via File, then send to email recipient but it offers the following formats only: HTML, EXCEL, TEXT FILES, RICH TEXT. So I took another route, and created a new zip file from my desktop and attempted to copy the...
2
1986
by: Derrick | last post by:
Is there any core assembly class that can compress/decompress files similar to winzip? I found how to create custom actions. What I would like to do is write something that decompresses winzip files. I tried adding the files to the deployment project, but they are so large that compiling, and trying to load the msi, both hang the machine. Want to develop custom action that shows users which zip files (each a set of data) are...
15
11140
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 ( update.zip ), and can automate the FTP'ing of the SE zip file to the update site. I have, as yet, been unable to find a way of automating the creation of a SE zip file from the initial update.zip. I have performed a rather
10
3049
by: Elric02 | last post by:
I'm currently trying to get access to the Python source code, however whenever I try to extract the files using the latest version of WinZip (version 10) I get the following error "error reading header after processing 0 entries" I was under the impression that I could (from reading the various posts on this group) that I could simply extract the tar ball, using WinZip. If this is not the case does anybody know how I can actually get...
1
5194
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 names because it works in the command window. The call is to apiGetShortPathName from the kernel. It works great for returning the short name for the xls file I am zipping. But then when I use the same path and name with a zip extension is...
11
2808
by: Killer42 | last post by:
Hi all. Has anyone else noticed this? In the Add dialogue, WinZip no longer allows you to follow a shortcut. Instead it simply selects the shortcut file itself to add to the archive. This is extremely frustrating. I have a particular archive which lives on a network drive, and each day I add to it some files from a local drive. I have a shortcut in the network folder, and until some time this year, I used to open the archive, hit the Add...
3
3929
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 example "My Data file Apr2007.zip"? In the example below, the parameter pZippedFile contains the file name with spaces and the pExtractFolder contains the folder where it should be extracted. 2. Is there anyway to get the extracted...
5
6152
by: Nilam2477 | last post by:
i need to zip the files/folder. How can i use winzip32.exe in C# code to programatically zip the files or folder. If you could provide some sample code that would be great. Thanks
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10008
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.