Download the Tom's Hardware App from the App Store
The reference for current tech news
Yes No
Ads
Tom's Hardware > Forum > Windows 2000/NT > General Discussion > Send To Compressed (Zipped) Folder

Send To Compressed (Zipped) Folder

Forum Windows 2000/NT : General Discussion Send To Compressed (Zipped) Folder

Word :    Username :           
 

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

 

Hi,

Does anyone know how to use the new zipping feature introduced with xp &
srv2003 from a command line?



Thanks,
Yaniv

Reply to Anonymous
Register or log in to remove.

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

 

On Mon, 25 Oct 2004 16:13:50 +0200, "msnews.microsoft.com" <yanive@nice.com> wrote:

>Hi,
>
>Does anyone know how to use the new zipping feature introduced with xp &
>srv2003 from a command line?
>
>
>
>Thanks,
>Yaniv
>
Try the compact command.

C:\>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
encountered.
/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
parameters.

C:\>





Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com

Reply to Anonymous
- 0 +

That's not what he was asking. Compact simply compresses the file using NTFS. It doesn't "send the file" to a "compressed folder" or zip file.

I've been looking around for something like this, found solutions for creating Visual basic applets, using PKZip and other third party solutions (which means we'd have to buy it if used in a corporate environment) and what we really want is the command line equivalent of "Send To > Compressed (zipped) Folder".

Anyway, my solution was to use 7-zip which is open source and comes with a command line option (7z.exe).
Simply go to 7-zip.org, download the app, the command line is something along the lines of this;

"c:\program files\7-zip\7z.exe" a "d:\backup files\compressed.zip" "c:\working files\uncompressed.txt"

Simple

:)

Dan
http://tipst3r.wordpress.com

Reply to abyssus
Tom's Hardware > Forum > Windows 2000/NT > General Discussion > Send To Compressed (Zipped) Folder
Go to:

There are 1951 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
  • Ask the community now
  • Publish
Ad
Ads
Latest best answer
Restoring an acronis image of NT 4.0
By hang-the-9, 29 days ago:

After you do the restore, before booting the image, boot off an NT 4 CD, start a command...

Best offers
They won a badge
Join us in greeting them