Extracting archives using UNZIP and the Command Window

01/24/09

Permalink 08:35:30 pm, by dave Email , 197 words, 1323 views   English (US)
Categories: Microsoft Tools, Open Source

Extracting archives using UNZIP and the Command Window

I had a large set of zip files that I needed to extract. I could have used the built-in functionality in Windows XP but I really did not want to walk through the extraction wizard for each zip file. So I looked around for something I could use from the command line and I came across Info-ZIP. Once I had downloaded and extracted the utilities, I opened a command window and cd'd to the directory that contained all the zip files. Once there, I ran the following commands. The first one extracted the contents of the zip files (I was lucky and the structure of the zips included a new directory) and the second moved the zip file into its corresponding new directory.

C:\zips>for /f %j in ('dir /b *.zip') do [full path to]\unzip %j

C:\zips>for /f "delims=. tokens=1,2" %j in ('dir /b *.zip') do move %j.%%k %j

I hope this post was of some use to you. If it didn't, I am always looking for new scripts to add so submit a request for your question or need and I will see if I can answer it.

Dave



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email



Pingbacks:

No Pingbacks for this post yet...

This post has 2 feedbacks awaiting moderation...

Windows Tools & Utilities

A place to share interesting and cool windows related tools, utilities, and applications that might be helpful to folks.

Search

Follow Me:

Misc

Who's Online?

  • Guest Users: 2

powered by b2evolution free blog software