zip

Extract a ZipFile

How can Extract a ZipFile in C#? (ZipFile is include file and Directory) ...

SharePoint problem: opening a office 2007 document tries to open as a zip file

I have a number of Office 2007 documents (.pptx, .docx, .xlsx) in a SharePoint document library and when user tries to open the documents, it tries to open as a zip file. This happens to some users, but not all. I posted this issue at http://superuser.com/questions/110211/why-office-2007-documents-open-as-a-zip-file, but I failed to me...

Extract a ZIP file programmatically by DotNetZip library?

I have a function that get a ZIP file and extract it to a directory (I use DotNetZip library.) public void ExtractFileToDirectory(string zipFileName, string outputDirectory) { ZipFile zip = ZipFile.Read(zipFileName); Directory.CreateDirectory(outputDirectory); zip.ExtractAll(outputDirectory,ExtractExistingFileAction.Overw...

Zip up all Paperclip attachments stored on S3

Paperclip is a great upload plugin for Rails. Storing uploads on the local filesystem or Amazon S3 seems to work well. I'd just assume store files on the localhost, but the use of S3 is required for this app as it will be hosted on Heroku. How would I go about getting all of my uploads/attachments from S3 in a single zipped download? G...

MySQL PHP zip code comparison specifically distance

Hi everyone! I'm trying to figure out what would be the most efficient (with respect to load time) to compare the distance between one zip code (which the user provides) and a whole bunch of other zip codes (there's approximately 200 zip codes right now, but its subject to increase over time). I don't need anything exact just in the bal...

Preserve file permissions when unzipping and the zipping files using ant

I'm writing an ant build.xml file which does the following: Takes a zipped folder (.zip) Unzips it Adds a number of files Zips up the resulting files An extract of the code from build.xml: <!-- Unzip SDK to a temporary directory --> <unzip src="${zipFile}" dest="tmp"/> <!-- pull in the files from another directory --> <copy todir="...

SQL Server 2008 - how to zip backup files and move to remote server

Hi, I have the non-enterprise edition of SQL Server 2008. I do nightly backups, manually zip the files and then manually copy to a remote server. I need to automate this using batch files. Copying files from server to server is easy but how do I automate the zipping of the backup first? The full process I need is: Run the backup nig...

PHP Zip Archive organized in a Array

I am trying to organize a Zip Archive into an array so that I may extract certain files into their rightful place. The Zip contains 3 folder, and in each folder holds files that may be extracted depending on their extension. Zip -> Folder 1 -----File 1 -----File 2 -----File 3 -> Folder 2 -----File 1 -----File 2 -> Folder 3 ----...

Recursively ZIP a directory containing any number of files and subdirectories in Java?

Is there an easy way to recursively ZIP a directory that may or may not contain any number of files and any number of levels of subdirectories? ...

DotNetZip: How to extract files, but ignoring the path in the zipfile?

Trying to extract files to a given folder ignoring the path in the zipfile but there doesn't seem to be a way. This seems a fairly basic requirement given all the other good stuff implemented in there. What am i missing ? code is - using (Ionic.Zip.ZipFile zf = Ionic.Zip.ZipFile.Read(zipPath)) { zf.ExtractAll(appPath); } ...

How can I generate zip file without saving to the disk with Ruby?

I have generated many pdf files in memory and I want to compress them into one zip file before sending it as a email attachment. I have looked at Rubyzip and it does not allows me to create a zip file without saving it to disk (maybe I am wrong). Is there any way I can compress those file without creating a temp file ? ...

What libraries should I use to manipulate archives from C++?

I want to manipulate .zip and .rar files from C++. What libraries should I use? ...

Function to create in-memory zip file and return as http response

I am avoiding the creation of files on disk, this is what I have got so far: def get_zip(request): import zipfile, StringIO i = open('picture.jpg', 'rb').read() o = StringIO.StringIO() zf = zipfile.ZipFile(o, mode='w') zf.writestr('picture.jpg', i) zf.close() o.seek(0) response = HttpResponse(o.read()) ...

How to do Python's zip in C#?

Python's zip function does the following: a = [1, 2, 3] b = [6, 7, 8] zipped = zip(a, b) result [[1, 6], [2, 7], [3, 8]] ...

What is the purpose of a zip function (as in Python or C# 4.0) ?

Someone asked How to do Python’s zip in C#?... ...which leads me to ask, what good is zip? In what scenarios do I need this? Is it really so foundational that I need this in the base class library? ...

What is the smallest, legal zip/jar file?

I hate generating an exception for things that I can simply test with an if statement. I know that a zero length zip/jar will trigger an exception if you try to access it using the java.util.zip/java.util.jar APIs. So, it seems like there should be a smallest file that these utility APIs are capable of working with. ...

Create normal zip file programmatically

Hi All I have seen many tutorials on how to compress a single file in c#. But I need to be able to create a normal *.zip file out of more than just one file. Is there anything in .NET that can do this? What would you suggest (baring in mind I'm under strict rules and cannot use other libraries) Thank you ...

Python in-memory zip library

Is there a Python library that allows manipulation of zip archives in memory, without having to use actual disk files? The ZipFile library does not allow you to update the archive. The only way seems to be to extract it to a directory, make your changes, and create a new zip from that directory. I want to modify zip archives without di...

Command to zip a directory using a specific directory as the root

I'm writing a PHP script that downloads a series of generated files (using wget) into a directory, and then zips then up, using the zip command. The downloads work perfectly, and the zipping mostly works. I run the command: zip -r /var/www/oraviewer/rgn_download/download/fcst_20100318_0319.zip /var/www/oraviewer/rgn_download/download/f...

How to compress a directory into a zip file programmatically.

I want to compress an entire directory which can have any number of subdirectories into a single ZIP file. I am able to compress a single file into a zip file programmatically. To compress an entire directory, i can think of a recursive program that walks through each subdirectory and compresses it. But Is there any simple way to comp...