We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


schedule file to unzip

BTMExpert asked
Medium Priority
Last Modified: 2011-10-03
I need to unzip a file every day and I was wondering whats the best way to schedule the file to unzip to a directroy and overwrite its old files every day at a certain time?
if say the zip file is C:\file storage\new.zip and I want to unzip that to C:\file storage\new\

I am guessing that I could use a batch file to do it and then but the batch file in scheduled tasks
but what needs to be in the batch file?
Watch Question

Someone just answered this question, I can't remember who though...it was just last week.

Winzip pro will do it:

You can schedule a WinZip Job file to run any time you wish. Click Schedule on the Specifications Complete panel of the Job Wizard. This is WinZip Pro feature.


my thought is you could use the command line syntax with winzip pro to do it for you.

Hopefully the person (I think it was leew) that answered it last time can swing by here.
LOL, well I guess you were the one that asked the question:


Did it not take care of what you needed?


nope I couldn't get it working
You should ask in the community support section to reopen that one and close this one...especially since you don't have any points now.

You can try 7-zip (http://www.7-zip.org/). It has a commandline interface (7za.exe)


I was able to get the infozip program working its the command line part of all of this that I don't understand

and how to automate the command line part of it

I don't know infozip, but I can explain it for 7-zip, asuming it is simular for infozip;

Create a batchfile with the following four lines:

@echo off
cd "C:\file storage\new\"
"C:\Program Files\7-Zip\7za" x -y "C:\file storage\new.zip"

The x is to eXtract, the -y option is to answer yes to all questions (do you want to overwrite?)
Because 7za is not able to extract to another directory than the current directory, the current directory is first changed to the directory where the files must be stored.
LOL I thought I posted the command line earlier today...oh well...I downloaded infozip and it should be:

unzip -Z -ddo "C:\file storage\new.zip" -d "C:\file storage\new\"

OR maybe

unzip -ddo "C:\file storage\new.zip" -d "C:\file storage\new\"

The options are confusing, Let us know...
Ah...I posted it in the other question:

I went ahead and downloading Infozip to see the program.

The command line looks like it would be:

unzip -ddo "c:\file storage\new.zip" -d "c:\file storage\new"


unzip -Z -ddo "c:\file storage\new.zip" -d "c:\file storage\new"

You'll need to test it...

Then when it is right...put it in a notepad doc, and then Save As, unzipbatch.bat (make sure you change it to all files when saving it or it will end up as unzipbatch.bat.txt)

Then open task scheduler and set up a scheduled task to run that batch file.

NOTE:  the batch file and the unzip program needs to be in the same location.

> Ah...I posted it in the other question:

Yes, that is the disadvantage of having two questions. I did not subscribe to the other one, so I did not see it.


ok I am in my cmd prompt I make sure I am in the C:\Program Files\Wiz directory where info zip said I should install it and I type in the what you suggested but I get the error 'unzip' is not recognized as an internal or external command, operable program or batch file.

I tried looking for the command line commands for it in the help section of info zip but couldn't find anything about command lines
look in that directory for the unzip.exe file (or do a search for it).  That's where the command line should be typed out.

The help file I referred to is in the unzip.txt file
Oh...btw...the whole "Wiz" directory thing...I didn't run an install.  Just downloaded the unz552xN.exe from their site, and ran the exe (inside a command prompt) and it extracted all of the files.  No need to install anything...


I don't see a file called unzip.txt in that directory we are both talking about info zip 5.03 right?
Here's what I did:

Go to info-zip.org

Then clicked on this link:


There I clicked on Win32 directory and it got me here:


The readme says that the file needed is unz552xN.exe

so I downloaded that to a new folder and went to a command line in that folder and ran the .exe to extract it all.


ok so I changed the
unzip -ddo "c:\file storage\new.zip" -d "c:\file storage\new"


wiz.exe -ddo "c:\file storage\new.zip" -d "c:\file storage\new"

and now its opening up the info zip program but I am getting a prompt that says "Can't open -ddo "c:\file storage\new.zip" -d "c:\file storage\new""
Try the last post I put up...I think you have the GUI version going.


I don't understand what you mean

I have the program installed and working properly
I am just trying to get it to unzip a file using the command line
I think you got the wrong version.

Go through my steps above to download the command line version.  Then run the command.


ok the command line is now working but it still isn't unzipping
so to simplify it I moved the files into the root of C: and was trying this

C:\Program Files\Wiz>unzip -ddo "c:\test.zip" -d "c:\testfiles\"
Archive:  c:/test.zip
caution: filename not matched:  -d
caution: filename not matched:  c:/testfiles/

C:\Program Files\Wiz>unzip -Z -ddo "c:\test.zip" -d "c:\testfiles\"
ZipInfo 2.42 of 28 February 2005, by Greg Roelofs and the Info-ZIP group.

List name, date/time, attribute, size, compression method, etc., about files
in list (excluding those in xlist) contained in the specified .zip archive(s).
"file[.zip]" may be a wildcard name containing *, ?, [] (e.g., "[a-j]*.zip").

   usage:  zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...]
      or:  unzip -Z [-12smlvChMtTz] file[.zip] [list...] [-x xlist...]

main listing-format options:             -s  short Unix "ls -l" format (def.)
  -1  filenames ONLY, one per line       -m  medium Unix "ls -l" format
  -2  just filenames but allow -h/-t/-z  -l  long Unix "ls -l" format
                                         -v  verbose, multi-page format
miscellaneous options:
  -h  print header line       -t  print totals for listed files or for all
  -z  print zipfile comment   -T  print file times in sortable decimal format
  -C  be case-insensitive     -M  page output through built-in "more"
  -x  exclude filenames that follow from listing

so I think its just the syntex error
try the first one again as simply

unzip "C:\test.zip" -d "C:\Program Files\Wiz"

and see if it unzips to the Wiz folder...then we can go from tehre...


ok that worked
is it that the folder has to be created to start with?

and how can I set it so it replaces them all without prompting
go ahead and create the folder it's going to be extracted to.

then try the command as:

unzip -do "C:\test.zip" -d "C:\Program Files\Wiz"

the unzip.txt has the command line options, but good luck trying to figure it out...it's pretty cryptic.

the -do should do a silent overwrite.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Thank you for the points!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.