Command Line Compression and Decompression

Posted on 2009-02-16
Last Modified: 2013-12-05
How do I do command line compression and decompression on Server 2003?
Question by:Robert_Waris
    LVL 95

    Expert Comment

    by:Lee W, MVP
    Use Compact -
    Displays or alters the compression of files on NTFS partitions.

    COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]

      /C        Compresses the specified files.  Directories will be marked
                so that files added afterward will be compressed.
      /U        Uncompresses the specified files.  Directories will be marked
                so that files added afterward will not be compressed.
      /S        Performs the specified operation on files in the given
                directory and all subdirectories.  Default "dir" is the
                current directory.
      /A        Displays files with the hidden or system attributes.  These
                files are omitted by default.
      /I        Continues performing the specified operation even after errors
                have occurred.  By default, COMPACT stops when an error is
      /F        Forces the compress operation on all specified files, even
                those which are already compressed.  Already-compressed files
                are skipped by default.
      /Q        Reports only the most essential information.
      filename  Specifies a pattern, file, or directory.

      Used without parameters, COMPACT displays the compression state of
      the current directory and any files it contains. You may use multiple
      filenames and wildcards.  You must put spaces between multiple

    Author Comment

    This works well on local files but not for files copied across the WAN.

    I have a 150mb file tat needs copied across the WAN.  I need to compress the file as much as possible to reduce the copy time Across the WAN.  Then the file can be automatically uncompressed and put in the correct location, on the other end.
    LVL 95

    Accepted Solution

    Adding a context helps us to know what you want to do.

    Then you need to use a zipping program - I use Info-Zip and related tools. - they offer GUI and command line tools.

    Author Closing Comment

    Good point , if I'd not been in such a hurry you've have got the answer on the first shot.  Sorry, but I've a one man show for the month of February.  Thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    My previous article  ( one possible method to get SCCM 2007 installed an…
    Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now