• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Archived

This topic is now archived and is closed to further replies.

ZIP command line options in XP

Recommended Posts

neojoker    0

Is there any way, by default, to use command line options to add files and folders to a zip file in Windows XP (meaning, using XP's built in Compressed Files feature instead of installing WinZIP, etc.)? Thanks.

Share this post


Link to post
Share on other sites
neojoker    0

That looks like the actual NTFS compression. I'm wanting to use Zip files. Or maybe I just read it incorrectly. :)

Thanks.

Share this post


Link to post
Share on other sites
Digitalx    17

DOS's pkzip B) too bad it lives on in windows 98 and not in xp

Share this post


Link to post
Share on other sites
JRosenfeld    2

I understood you to say you wanted to use the native XP method for compressed files. As far as I know, XP treats a.zip file like a compressed folder.

I happen to have Winzip installed, and usually use that to open a .zip file. However if I right click on a .zip file in Windows Exploer and click Explore, it opens like a subfolder in Windows Explorer.

So I think the compact command should work.

Oops, just tried, it does not work to add a file to a .zip file. It does work to add and compress a file to a compressed folder.

Share this post


Link to post
Share on other sites
brand    0

now i'm severly interested in this.

humm...

opening the compressed folder view (explorer):

rundll32.exe zipfldr.dll,RouteTheCall [Zipfile].zip

I'm gonna spend some time looking for of this up to see if there are other calls available.

Share this post


Link to post
Share on other sites
brand    0

alright... after some long investigating i figured out that there is no way to run this via command line, even rundlling the dll file.

Any programming examples i found (I was hoping to write up a quick vbscript to use) simulate a drop-target function, and call the CLSID of the send-to folder shortcut thing.

Oh microsoft, you've failed us again. I mean, it's another stupid little thing that it would take a single microsoft programmer a day to bang out a DLL, or even an gui executable, or command line... but noooooo they wouldn't've wanted to do that.

maybe for vista. PowerShell?

Share this post


Link to post
Share on other sites
MazX_Napalm    0

7 Zip has command line functionality.

And its free.

Share this post


Link to post
Share on other sites
Bananashake    0

Yeah, but he doesn't want to use an external program and want the internal Zip tool to do that.

Share this post


Link to post
Share on other sites
Human.Online    7,996

I use Winzip with the command line addon. I understand that it's an external program, but hey - just a suggestion.

Share this post


Link to post
Share on other sites
+BudMan    3,365

Um, who said xp did not support compressed folders from the command line?

C:\>compress /?

Syntax:

COMPRESS [-R] [-D] [-S] [ -Z | -ZX ] Source Destination

COMPRESS -R [-D] [-S] [ -Z | -ZX ] Source [Destination]

Description:

Compresses one or more files.

Parameter List:

-R Rename compressed files.

-D Update compressed files only if out of date.

-S Suppress copyright information.

-ZX LZX compression. This is default compression.

-Z MS-ZIP compression.

Source Source file specification. Wildcards may be

used.

Destination Destination file | path specification.

Destination may be a directory. If Source is

multiple files and -r is not specified,

Destination must be a directory.

Examples:

COMPRESS temp.txt compressed.txt

COMPRESS -R *.*

COMPRESS -R *.exe *.dll compressed_dir

edit: grab the 2k3 resource kit and it does ;)

http://www.microsoft.com/downloads/details...;displaylang=en

But it might be easier -- and clearly more features to just use a FREE tool like 7z

C:\>7z

7-Zip 4.42 Copyright ? 1999-2006 Igor Pavlov 2006-05-14

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]

[<@listfiles...>]

<Commands>

a: Add files to archive

d: Delete files from archive

e: Extract files from archive (without using directory names)

l: List contents of archive

t: Test integrity of archive

u: Update files to archive

x: eXtract files with full paths

<Switches>

-ai[r[-|0]]{@listfile|!wildcard}: Include archives

-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives

-bd: Disable percentage indicator

-i[r[-|0]]{@listfile|!wildcard}: Include filenames

-m{Parameters}: set compression Method

-o{Directory}: set Output directory

-p{Password}: set Password

-r[-|0]: Recurse subdirectories

-scs{UTF-8 | WIN | DOS}: set charset for list files

-sfx[{name}]: Create SFX archive

-si[{name}]: read data from stdin

-slt: show technical information for l (List) command

-so: write data to stdout

-t{Type}: Set type of archive

-v{Size}[b|k|m|g]: Create volumes

-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options

-w[{path}]: assign Work directory. Empty path means a temporary directory

-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames

-y: assume Yes on all queries

Share this post


Link to post
Share on other sites
Human.Online    7,996

Where is this compress exe? I run cmd type compress with the needed params - not found. Is this part of XP? Can't find it - searched c:

Share this post


Link to post
Share on other sites
+BudMan    3,365

Like I said you need to download the resource kit for 2k3.. which is FREE. But you know upon further playing with it and its not very good. I would highly suggest the user just bite the bullet and use a external program.. ie 7zip is FREE for all uses personal and work, etc.

Share this post


Link to post
Share on other sites
Human.Online    7,996

Thanks, sorry missed the resource kit. My bad!

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.