1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Help with batch files and unzipping

Discussion in 'DOS/Other' started by DocVonBubbles, Aug 7, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. DocVonBubbles

    DocVonBubbles Thread Starter

    Joined:
    Aug 7, 2006
    Messages:
    2
    Hello, I don't know very much about batch itself but a know a bit about computers and web development.

    What I want to do is make a batch file (or something like it) that will unzip all the files in a directory and then move all the files with a certain extention to a new directory. Is it possible? Could someone give me some help has to how to go about this? I've tried looking around for tutorials, but the only ones I could find that were close were ones on how to zip files, not unzip them.
     
  2. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
    Well, you will need a command line unzip utility.
    http://www.info-zip.org/Zip.html

    Then what I think you would want to do is always extract the file to the same directory. Or you could give the batch file two parameters from the command line. The first one would be what zip file to unzip and the second would be where to unzip it too.
     
  3. JohnWill

    JohnWill Retired Moderator

    Joined:
    Oct 19, 2002
    Messages:
    106,418
    You can use the MOVE command to move the specific files.

    MOVE *.jpg c:\jpg

    That command moves all the JPG files from the current folder to a folder in the root of C: called JPG.
     
  4. DocVonBubbles

    DocVonBubbles Thread Starter

    Joined:
    Aug 7, 2006
    Messages:
    2
    Thank you both! It took me awhile but a figured it out.

    Mwahaha! All the zips are now dominated by my iron fist! The only problem is, apparently, they all made a deal with DOS and changed their names in a petty attempt to confuse me. No matter, their names becoming shorter will not help them!

    Err... yeah... thanks again...
     
  5. JohnWill

    JohnWill Retired Moderator

    Joined:
    Oct 19, 2002
    Messages:
    106,418
    You should be able to retain the long file names with the current version of InfoZIP. There is also a command line enhancement for WinZIP that will allow batch file use.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/490134

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice