• Navigation
Results 1 to 5 of 5
  1. #1
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Can you create a zip file using cmd line for a .bat?

    So i'm enrolled in this very basic class, and our 1st assignment was...creating folders and zipping them >.>

    Anyways, I wanted to create a .bat to do the entire homework assignment in 1 click. Just something very simple that makes a directory, then moves said directory into a .zip. But I have no idea wtf the command is for creating a zip using cmd prompt or if there even is one. A lot of what im reading online says you need to download other files/programs for it to even work, which I think is very strange that it wouldn't be included as a basic cmd operation.

  2. #2
    Salvage Bans
    Join Date
    Feb 2007
    Posts
    811
    BG Level
    5
    FFXIV Character
    Orinthia Warsong
    FFXIV Server
    Excalibur
    FFXI Server
    Bahamut

    It is odd, but windows does not include a method of zipping folders/etc for its command prompt. This is especially sad since old dos-based windows had pkzip I think... been too long lol, but this is pretty sad nonetheless.

    Look here: http://stahlworks.com/dev/index.php?tool=zipunzip , there's a specific zip.exe in there for quick download. Or if you have 7zip installed, use "7z.exe" for this. There's a way to do this with windows' powershell but it's not exactly easy... here if curious: http://blogs.msdn.com/b/daiken/archi...ar-gadget.aspx

    add: also some win server 2003 resource kit that has a compress.exe, but it might not act like you'd expect: http://www.microsoft.com/download/en...ng=en&id=17657

  3. #3
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Damn, well that's ok I guess. Wrote it up to just move all the folders/files around and what note with messages to zip them up. I figure its more then our last project will even entail honestly.

  4. #4
    Bagel
    Join Date
    Jul 2005
    Posts
    1,297
    BG Level
    6
    FFXIV Character
    Trent Reznuh
    FFXIV Server
    Balmung
    FFXI Server
    Sylph

    makecab & expand come with windows and would do what you want to do, although with .cab files instead of .zip files. this could either impress your professor or have you fail, but it should work.

  5. #5
    I Am, Who I Am.
    Join Date
    Nov 2005
    Posts
    15,657
    BG Level
    9
    FFXIV Character
    Trixi Sephyuyx
    FFXIV Server
    Excalibur
    FFXI Server
    Ragnarok

    Use 7zip command line functionaility to create zips if youre allowed to do that.

    If not, do some searches on zfsendtotarget. That is the built in library tha creates zip files in Windows.
    http://groups.google.com/group/micro...%3A*.scripting
    http://www.visualbasicscript.com/ZIP...ly-m27111.aspx

Similar Threads

  1. Can you use Vista drivers on a XP (OS)?
    By Pikarya in forum Tech
    Replies: 3
    Last Post: 2009-02-17, 17:09