Windows Resource Kits COMPRESS.EXE Help

J

jburkett07

I'm trying to compress some files using command line to automate a
process. I have downloaded the 'Windows Resource Kits' to use
compress.exe (the built in windows compression) I can get it to zip a
single file however I can't figure out how to get it to zip a folder
or multiple files... If someone could provide me with the syntax it
would be greatly appreciated! Thanks.
 
C

Curt Christianson

Hi,

I was going to try using "compress" and report the results, but in the RK
notes it states:

"
a.. Do not use Compress.exe (Compress) to compress files or folders on the
NTFS file system formatted files or folders. To compress or decompress
NTFS-formatted files or folders, use the Compact command-line tool or set
the Compressed attribute of the file or folder in Windows Explorer. "

My system is NTFS, so I dare not try. It would appear the -Z, or -ZX
parameter *should* work though.

--
HTH,
Curt

Windows Support Center
www.aumha.org
Practically Nerded,...
http://dundats.mvps.org/Index.htm

| I'm trying to compress some files using command line to automate a
| process. I have downloaded the 'Windows Resource Kits' to use
| compress.exe (the built in windows compression) I can get it to zip a
| single file however I can't figure out how to get it to zip a folder
| or multiple files... If someone could provide me with the syntax it
| would be greatly appreciated! Thanks.
|
 
J

jburkett07

ok... I'm a noobie when it comes to cmd line... If i want to compress
all files in the folder c:\solix (there's really only two files here,
one .txt and the other .ctrl) into the directory same directory as
file name solix.zip what would my parameter syntax be?

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

Curt Christianson

I think if were mee too.I'd bit the bullet and give it a try

I think it's sdmirable more like yourself to become more familiar with the
command-line, and I swear I only thing I can do is a few dir/o/p, and maybe
some expands commands.

Do you realize there are so proficient with the keyboard, that can get
twice am much done with the one-tail rodent.

Cheers,Curt

--
HTH,
Curt

Windows Support Center
www.aumha.org
Practically Nerded,...
http://dundats.mvps.org/Index.htm

| ok... I'm a noobie when it comes to cmd line... If i want to compress
| all files in the folder c:\solix (there's really only two files here,
| one .txt and the other .ctrl) into the directory same directory as
| file name solix.zip what would my parameter syntax be?
|
| 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.
|
|
| On Aug 13, 10:23 am, "Curt Christianson"
| > Hi,
| >
| > I was going to try using "compress" and report the results, but in the
RK
| > notes it states:
| >
| > "
| > a.. Do not use Compress.exe (Compress) to compress files or folders on
the
| > NTFS file system formatted files or folders. To compress or decompress
| > NTFS-formatted files or folders, use the Compact command-line tool or
set
| > the Compressed attribute of the file or folder in Windows Explorer. "
| >
| > My system is NTFS, so I dare not try. It would appear the -Z, or -ZX
| > parameter *should* work though.
| >
| > --
| > HTH,
| > Curt
| >
| > Windows Support Centerwww.aumha.org
| > Practically Nerded,...http://dundats.mvps.org/Index.htm
| >
| >
| > | > | I'm trying to compress some files using command line to automate a
| > | process. I have downloaded the 'Windows Resource Kits' to use
| > | compress.exe (the built in windows compression) I can get it to zip a
| > | single file however I can't figure out how to get it to zip a folder
| > | or multiple files... If someone could provide me with the syntax it
| > | would be greatly appreciated! Thanks.
| > |
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top