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.

XP - Can I zip files using command line arguments?

Discussion in 'Windows XP' started by magoo_19, Nov 27, 2003.

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

    magoo_19 Thread Starter

    Joined:
    Nov 26, 2003
    Messages:
    3
    Has anyone tried to use the zipfldr.dll in windows XP to zip files in a command line style from a batch file?

    I've done this on NT when invoking winzip but wondered whether I can do the same on XP using the inbuilt Zip file tool. I have found some information to the effect that I might be able to use something like:

    rundll32.exe zipfldr.dll,<entrypoint> <arguments>

    however all I have managed to get to so far is opening up the directory that I've entered the files that I want to zip into, i.e.

    rundll32.exe zipfldr.dll,RouteTheCall c:\zipthesefiles

    Any help/hints would be appreciated.

    Regards,

    Magoo_19
     
  2. JohnWill

    JohnWill Retired Moderator

    Joined:
    Oct 19, 2002
    Messages:
    106,418
  3. JamesFray

    JamesFray

    Joined:
    Nov 21, 2003
    Messages:
    117
    rundll32.exe zipfldr.dll,RouteTheCall %1 is used to open the zipped foler in Explorer rather than zip a folder. Hard to find related parameters used by rundll32.exe zipfldr.dll,
     
  4. magoo_19

    magoo_19 Thread Starter

    Joined:
    Nov 26, 2003
    Messages:
    3
    Thanks for the hint on IzArc johnwill, I could use winzip itself on XP as I already have it but I'n curious to understand a bit more about XP etc but I think hit the same barrier that JamesFray has highlighted in his posting.

    Could this be a licensing issue with M$, only being allowed to use the GUI version of the product as command line stuff might bring up copyright issues with tools like pkunzip?
     
  5. JohnWill

    JohnWill Retired Moderator

    Joined:
    Oct 19, 2002
    Messages:
    106,418
    Hard to say, I just take the path of least resistance. :D
     
  6. zephyr

    zephyr

    Joined:
    Nov 5, 2003
    Messages:
    2,324
    Download the Winzip Command Line Add on. It also free trial as is Winzip. I use it in a batch file all the time. It works great.

    Here's one I made for my brother:

    Code:
    @echo off
    echo This batch file compresses the file named C:\qpw\marshfiles\loan2.wb2
    echo if it exixts, and sends it to the A:\ drive for backup purposes.
    echo It will use more than one floppy if necessary.
    echo:
    echo:
    if exist c:\qpw\marshfiles\loan2.wb2 goto confirmed
    echo:
    echo:
    echo The file is not there!! The backup cannot be made since the file you 
    echo are trying to backup is missing.  To replace it, run the 2recover
    echo command and press enter.  Then follow the screen directions about
    echo placing the latest backup floppy [floppies] in the drive.
    echo That will restore your file from the backup floppy.
    pause
    goto end
    :confirmed
    wzzip "-&w" a:\loan2.zip  c:\qpw\marshfiles\loan2.wb2
    ::The quotation marks are necessary in XP and "&w" was added to allow
    ::for spanning multiple disk if necessary.  It will wipe the disk prior
    ::to starting the write process.
    pause
    
    You can edit the command to your use I'm sure:

    wzzip "-&w" a:\loan2.zip c:\qpw\marshfiles\loan2.wb2

    translates to:

    wzzip "-&w" <target zip file to be created> <source path)


    Any??
     
  7. zephyr

    zephyr

    Joined:
    Nov 5, 2003
    Messages:
    2,324
    I also have this one that I made for zipping files onto floppies and spanning as needed.

    zipspan.bat

    Code:
    :: This batch file compresses files or folders and, if necessary,
    :: spans multiple diskettes automatically to store them on floppy/floppies.
    :: It requires Winzip and the Command Line add on which is freely available.
    :: Syntax is, ZIPSPAN [FILENAME or PATH to SOURCE] [zip file name to create on diskette]
    :: Example= ZIPSPAN c:\myfile.txt MyBackup
    wzzip "-&w" -rp -whs A:\%2  %1
    :: The quotation marks are necessary around "-&W" in XP usage. 
    :: It will wipe the disk prior to starting the write process.
    pause
     
    Winzip Free Evaluation Version
    Winzip Free Command Line Add On.

    Put them in your PATH or change the path if you prefer keeping them in a separate folder.
     
  8. magoo_19

    magoo_19 Thread Starter

    Joined:
    Nov 26, 2003
    Messages:
    3
    zephyr, thanks very much for your points, however if I can refer you back to the original question, I have Winzip and currently perform the task on NT using a method as you suggest. My aim was to see if I can use the in-built zip functionality using a command line approach instead of the GUI interface...becuase, well it's there in the operating system.

    I think it's likely the case that it is un-achievable so I'll stick with running winzip as I do on NT, but there's no challenge if you don't have a go at something first!!
     
  9. JohnWill

    JohnWill Retired Moderator

    Joined:
    Oct 19, 2002
    Messages:
    106,418
    There are also several free ZIP alternatives, Info-Zip has a command line version that recognizes long file names. One issue that some folks have with WinZIP is that you have to buy it for every machine. If you're rolling out a solution for a lot of machines, free is good! :D
     
  10. zephyr

    zephyr

    Joined:
    Nov 5, 2003
    Messages:
    2,324
    OK, Magoo, I understand. I just wasn't sure of your level of success with Winzip.

    Johnwill, Since the Winzip free trial period never expires, many folks treat it as freeware. I don't suggest that it's ethical to do that but I just wanted you to know all the facts. I actually registered my copy many years ago since finding it to be an excellent adjunct to my OS and worth every penny of the small cost. It worked so very well, I just couldn't stiff them. :)

    Best regards.
     
  11. JohnWill

    JohnWill Retired Moderator

    Joined:
    Oct 19, 2002
    Messages:
    106,418
    While WinZip apparently never expires, it's a PITA to keep clicking on the shareware prompt. :) Also, while you're probably safe at home doing that, I expect in a business environment, you want to have licensed copies for software you use.
     
  12. zephyr

    zephyr

    Joined:
    Nov 5, 2003
    Messages:
    2,324
    Your point is well taken. Since my copy is registered I was unaware of the nag.

    Thanks.
     
  13. 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/182802

  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