Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 450
  • Last Modified:

Unzipping a ZIP file using a .bat file on Windows 2003 Server

Currently, we manually unzip files to deploy code on our Windows 2003 server.  How can I create a bat file to automatically unzip the file?  I am unable to determine what the syntax would be to do this.

So if I create a file called deploy.bat, what is the code to unzip a file called aspzip.zip?

I don't think we have any special zip program installed on our Windows 2003 server.  I think that it is just whatever cam from Microsoft for that OS.

Please let me know if you can assist.  

Thank you,

kpetti
0
kpetti
Asked:
kpetti
  • 5
  • 5
  • 3
  • +2
1 Solution
 
callrsCommented:
See http://www.rarlab.com/rar_add.htm --> Command line freeware Windows UnRAR
0
 
kpettiAuthor Commented:
Hi callrs,

The only problem is that I work for a large corporation.  We aren't allowed to just install software that is not certified by the company that I work for.  We don't use any freeware software.

Any other thoughts on how to do this at the dos prompt using whatever is built in with Windows 2003?

Thanks for your quick response.

kpetti
0
 
WmOfTewksCommented:
There are any number of zip tools and most of them support command line.  A favorite of mine is FilZip (http://www.filzip.com/en/index.html) which has a very simple command line interface.  From its help file:

===================================
Since Version 1.6, FilZip supports Command Line access. At the moment, you can only add & extract files to archives. Here are the parameters:

Usage:    filzip.exe <-command> [-<sw> [-<sw>...]] <archive_name> [<filename>...]
Example:  filzip.exe -a -rp test.zip *.txt
<Commands>

-a : Add files
-e : Extract files

<Switches>
Add

r : Add recursive
p : Save path names
f : Save full path info
s : Load filelist from parameter file

Extract

r : restore path names
o : overwrite existing files
u : update older files

Note:
If you want to add a big number of files to an archive, write them into a textfile, one in each line, use the -s switch and run with this file as parameter. Example:

filzip.exe -a -rps test.zip param.txt
===================================

If you want to get fancy (or difficult), Tugzip (http://www.tugzip.com/) uses JavaScript to do a whole range of operations.

Both are freeware but ask for donations, which I heartily endorse.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
WmOfTewksCommented:
OK.  No freeware.  You might ask if WinZip is approved.  It is the defacto standard and has a command line interface (http://www.winzip.com/prodpagecl.htm).  And you have to pay, but not much.
0
 
kpettiAuthor Commented:
I think that WinZip is approved.  Is there a way to run the winzip commands from the command line using a bat file?  Please let me know if you can help.  Please let me know if you can help with syntax for WinZip.
0
 
WmOfTewksCommented:
See the link.  It is about their command line interface add-on.
0
 
callrsCommented:
Winrar  can surely be approved -- it's a vastly superior product! Why toot an inferior product?
0
 
brettmjohnsonCommented:
> Winrar  can surely be approved -- it's a vastly superior product! Why toot an inferior product?

How naive.  Corporate IT departments rarely approve superior products.  Quality and usability simply don't factor into the approval process.
0
 
ola_erikCommented:
Ive succesfully used the command line version of http://www.powerarchiver.com/download/ when packing files (and then ftp them to a remote location.)

This package doesnt have to be installed, just extracted. (if you appreciate the distinction) and its a small version (fully functional 7 USD shareware) of a commercial product.

a .bat file to unzip the file
aspzip.zip
would look like>

  paext aspzip.zip

the file paext.exe, the .bat file and the file to unzip have to be in the same directory.

The guys selling the software doesnt list their adress on the site though, it traces back to some chineese origin.
0
 
kpettiAuthor Commented:
Hi Everyone,

Thank you all for answering my question.  I appreciate all of the answers.  WinZip is currently supported at my company and we are looking into purchasing the command line add on.

Thank you,

kpetti
0
 
callrsCommented:
Hmm. Sadly, brettmjohnson was right  :(

Looks like inertia may take a while to break, as is the case with QWERTY keyboard layout vs. the vastly superior DVORAK layout

kpetti, I challenge you to try at least the GUI version of Winrar & compare it to Winzip. The user-friendliness & functionality simply don't compare to Winzip.

brettmjohnson, lets try to get big Yahoo to accept rar files at geocities. If Yahoo does it, the others will follow :-D
0
 
kpettiAuthor Commented:
callrs,

For my home PC, I will look into that.  For the company that I work at, things don't work that way.  I don't have any control over what software our company purchases and certifies for use.  I work at a major corporation and unfortunetely, I would be fighting a losing battle.

Now if this was my previous employer, it was a very small firm and I would say that there was an 80 - 90 % chance that I could get them to use rarlab software.

Thanks for your suggestions.

kpetti
0
 
callrsCommented:
>> "I would be fighting a losing battle."

Not necessarily a losing battle. Where would we be today if women, blacks, slaves etc. didn't fight "a losing battle"

Mountains are hard to move, but with intelligence, skill, and a step at a time, they can be. But we all must do our part, else it can take an eternity...

Change must start somewhere. Waves of change amplify as others pick up on & radiate them. To me, money/business/hedonism matters little vs. the real value of "what personal/business actions/products really help society", so  I will strive to the death to live up to the ideal of cultivating change for the better.

The issue of ties (the suit and tie kind, not politics) too was "a losing battle" for me for years, but finally someone at the top took note: The president of Japan, under a year ago, announced a personal dislike for & a public campaign against the ties. (story appeared in paper, but I can't locate it on the net cause of the "tie" word's double meaning. Closest found is this www.taipeitimes.com/News/world/archives/2005/06/01/2003257471)

I recently discovered that the grocery store giants Food Basics and A&P have finally started composting the vast produce they were sending to the landfill. A losing battle finally won & everyone wins in the process, including our environment.  : )


-R.S.

0
 
kpettiAuthor Commented:
I think you're right.  I'm going to go to work tomorrow and start a petition for us to get rarlab software.  I'll let you know how the fight goes...

Thank you for your words of inspiration.
0
 
callrsCommented:
That's the spirit. Thanks :)

Just a footnote: Winrar is much better than winzip, but I don't know if there's anything better than even winrar.

If you want to reassign or split or increase the points, just click the "Support" link at top right. If not, well, your thanks -- and this chance at launching some spirited waves -- was great   :)

0
 
ola_erikCommented:
sry if this a bit off topic,

regarding the DVORAK-QWERTY case
http://www.utdallas.edu/~liebowit/keys1.html
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now