Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a zip file that contains many files. Each file in the zip file is about 100MB, and is compressed about 10% (IE it is about 90MB in the zip file). The whole zip file is 20GB, and I'm trying to unzip it onto a drive that has only 30GB free.

On Windows 7, how can I unzip a zip file on my laptop's harddrive that doesn't have enough space for both the zipped and unzipped copies of the file?

IE can I tell windows to remove stuff from the zip file as it is uncompressed?

share|improve this question
    
Can you burn the zip file to an optical disc (CD or DVD), delete it from the hard disk, and then unzip it from the CD? –  Scott Jun 28 '13 at 3:04
    
Good thought, @Scott, but it's too big for any opitcal or USB flash drives I have available. –  David Oneill Jun 28 '13 at 3:20
    
Unzip some of the files, and write those to CDs? –  MSalters Jun 28 '13 at 12:12

4 Answers 4

Sane(-oid) Method

If you had a big enough flash drive (or writable network location, like another CIFS-capable computer on the network), you could extract one file at a time from the archive, then delete the file from the archive, using the (~20GB free) "other space" as the temporary/scratch location. Every archiving utility I've ever worked with can specify an alternate temporary location.

This example script uses 7-zip (as well as grep and sed):

@ECHO OFF
SETLOCAL

SET ARCHIVE=temp.zip
SET SCRATCH_PATH=D:\temp
SET DEST_DIR=%~dp0\extracted

FOR /F "delims=*" %%f IN ('7z.exe l "%ARCHIVE%" -slt ^| grep -B1 "Folder = -" ^| grep "Path = " ^| sed "s/Path = //"') DO (
    @ECHO.
    @ECHO %%~f
    7z.exe x -y -o"%DEST_DIR%" -w"%SCRATCH_DIR%" "%ARCHIVE%" "%%~f" >NUL
    7z.exe d -w"%SCRATCH_DIR%" "%ARCHIVE%" "%%~f" >NUL
    FOR %%g IN (%ARCHIVE%) DO @ECHO   %ARCHIVE%: %%~zg
)

It is functionally correct, though I did not attempt to create a file too big to extract on my computer just to test it.

Crazy Method

You could also temporarily compress some files on the hard drive that you know you won't need during the extraction process (like, say Office) to free up just enough space to extract the files, then reverse the process once extraction is complete.

share|improve this answer

I don't think you can pull this off. I don't know of any Windows zip utility that can extract a file and then in place truncate the archive without even using a temporary file. You'll just need to do this on a drive with adequate space available.

share|improve this answer
    
This is what I'm afraid of... I'm going to leave the question open for a few days, see if I get someone who knows how to do it. If not, I'll accept your answer. –  David Oneill Jun 28 '13 at 4:22
    
Technically it's possible (follow the link from my answer here for the requisite steps), but you'll be hard pressed to find any utility that does this. Not only is it rarely required, but not using a temp file and shifting compressed data/file records inside the existing archive is just a recipe for disaster. If you can program then perhaps you can look into it (the SO question even has code to get you started), but I'd say implementing it would be a waste of time. –  Karan Jun 28 '13 at 4:30
    
After re-reading your question, just want to confirm something. Are you saying the drive has 30GB free after copying the 20GB archive to it? Because if that ~10% compression figure you gave is true, that means the files uncompressed would be ~22GB. Let's say ~25GB max, which of course can fit inside the 30GB free space. –  Karan Jun 28 '13 at 18:05
    
No, the drive has 30BG free before putting the 20GB file on it. Re-reading my question, I wasn't clear, but you did interpret it correctly. –  David Oneill Jul 18 '13 at 13:23

Super simple solution: Copy to a portable HDD and unzip it, or give it to a friend to unzip.

share|improve this answer
    
though this seems like the most obvious way to do it, it might not be possible to do what you are suggesting in a corporate environment.The uniformity of file sizes and compression ratios suggest that the files are some kind of log files or data files. It could be confidential stuff –  Shekhar Jun 28 '13 at 18:13
1  
This would work for someone who has a portable HDD. –  David Oneill Jul 18 '13 at 13:24

haven't tried it, but this might work ... http://www.hongkiat.com/blog/unzip-files-online-with-wobzip/

Wobzip is an online service that helps you to unzip almost any compressed formats it currently supports up to 100Mb of single compressed file so it would suit your purpose.

Upload your files to the server, and then you can delete the existing zip and then download the uncompressed file contents

It doenot support unicode, but will work with password protected files

share|improve this answer
3  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  gronostaj Jun 28 '13 at 14:01
1  
The zip file is 20 GB in size, so no doubt it'll take ages to upload. But let's forget that for a bit. You don't need to try what you're recommending, but you could at least read that page you linked to carefully: "Wobzip is an online service that ... currently supports up to 100 MB of single compressed file." –  Karan Jun 28 '13 at 17:57
    
-1 Won't work, my file's too big for their service. –  David Oneill Jul 18 '13 at 13:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.