Wednesday, 15 September 2010

windows - Unziping files to existing directories in Visual Studio 2005 C++? -


I have a directory structure already on the client machine server that looks like this:

  - | + CSS | ABC | -EFG | -XYZ + img | ABC | -EFG | -XYZ + js | ABC | -EFG | -XYZ + htm | ABC | -EFG | -XYZ  

When we send updates to our customers on our e-commerce website, we send them to the ZIP file, which contains the following structure:

 < Code> - | + CSS | -UniqueDirectory + img | -UniqueDirectory + js | -UniqueDirectory + htm |. -UniqueDirectory  

... Where UniqueDirectory is always the same name

That's why being said, there is a program zip that has Visual C ++ 2005 One way that the file can be written to unzip and can be written to that we can send the client to the existing directory (without the overwriting of any existing directory, except definitely UniqueDirectory) Is overwritten)

The final result after unzipping the file on the client machine should be:

  - | + CSS | ABC | -EFG | -UniqueDirectory | -XYZ + img | ABC | -EFG | -UniqueDirectory | -XYZ + js | ABC | -EFG | -UniqueDirectory | -XYZ + htm | ABC | -EFG | -Directory Directory | -XYZ  

Can it be done using C ++? My clients do not include technical skills, they simply do not want to set up an unzipping program, opening the file in the correct directories.

Will it require an external library? Preferably I want to do this by using Visual Library only from Visual C ++ 2005, but if an external library is required I want to know what it is called.

Only when you are not available with VS2005, you only want to apply compression / decompression algorithm , Then you want to use a library to do your work for yourself. I recommend . It's free

is one

Edit: .. In response to the question in your comment, yes it has to be manufactured by the old VS2005. I just downloaded the latest source and was able to compile it in a .dll . I downloaded the copy "zlib source code, version 1.2.3, zipfile format" . After removing files, see / projects / visualc6 / directory you should be able to build the library there.

Alternatively you can download a pre-compiled library from the zlib site. This source file is listed as "zlib compiled DLL, version 1.2.3, zipfile format" with download file.

Edit: Keep in mind that zlib is a C library if you are looking for a C ++ library , You can try, which is basically zlib with a C ++ wrapper.


No comments:

Post a Comment