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.

BATch file using WinZip wzzip

Discussion in 'Windows XP' started by NightZEN, Dec 23, 2003.

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

    NightZEN Thread Starter

    Joined:
    Dec 23, 2003
    Messages:
    2
    I have a batch file to copy a file to a temporary folder, and zip it as follows:

    Copy S:\Apps\AppsDB\Split\BE\AppsDB_R1.0_be.mdb C:\ZIPTEST
    Pause
    wzzip -a -f C:\ZIPTEST\NEW\BE.ZIP C:\ZIPTEST\AppsDB_R1.0_be.mdb
    Pause

    When I run it says that wzzip is an unrecognized internal or external command (see attached screen capture) I have installed the WinZIP command line support add-on, but am new to batch files.
     
  2. Sponsor

  3. zephyr

    zephyr

    Joined:
    Nov 5, 2003
    Messages:
    2,324
    It sounds like Winzip needs to be put in the PATH statement so it can be with the other Environmental Varibles.

    Any??
     
  4. zephyr

    zephyr

    Joined:
    Nov 5, 2003
    Messages:
    2,324
    Here's how in XP, right click the My Computer icon > Properties > Advanced > Environmental Variables > highlight PATH in the bottom field > Edit > then add the complete path to your Winzip directory, ie, C:\Program Files\Winzip and follow it with a ; at the end.

    [​IMG]
     

    Attached Files:

  5. zephyr

    zephyr

    Joined:
    Nov 5, 2003
    Messages:
    2,324
    Here's a batch file I use with the Winzip utility to do general purpose copying and it spans disks as necessary.

    PHP:
    :: 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 isZIPSPAN [FILENAME or PATH to SOURCE] [zip file name to create on diskette]
    :: 
    ExampleZIPSPAN 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

    I've dubbed it zipspan.bat but you may call it whatever you prefer.
     
  6. NightZEN

    NightZEN Thread Starter

    Joined:
    Dec 23, 2003
    Messages:
    2
    zephyr, That was it. Thanks!
     
  7. 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/189478