ZIP command line options in XP


Recommended Posts

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.

Edited by JRosenfeld

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.

Edited by bigflavor
  JRosenfeld said:

Command line guide for XP:

http://www.microsoft.com/resources/documen...s.mspx?mfr=true

look at compact.

The compact command configures NTFS compression on files and folders, not .zip files, which XP calles "Compressed Folders" (a bit misleading)...

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?

  • 1 year later...

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

Edited by BudMan

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.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Never use an in-browser password manager. It creates a barrier to using any other web browser.
    • I have always wondered if there is any difference between .BAT and .CMD files!
    • I will confirm the Vista hate was ridiculous. They had a point before SP1 and too many didn't use newer components at launch, misleading some to believe it was bad. It really wasn't (after SP1.) The jump from 98/ME to XP didn't get a bad reaction at all from what I remember. 8 was awful. 10 for the most part ran pretty well but people disliked the telemetry and standard MS shenanigans, but 11 is definitely worse in some ways.
    • What I can confirm to not be exaggerations or misinformation is the slowness of the standard right click menus and the Task Manager in Windows 11, even on brand spanking new bare installs.
    • Linux 6.16-rc2: Smaller than usual, but with notable network and bcachefs tweaks by Paul Hill Linus Torvalds, the creator of the Linux kernel, has just released the second release candidate of Linux 6.16. Following the release of Linux 6.15, developers submitted their new features to be merged with Linux 6.16. These release candidates are focused on polishing the kernel before release, following the merging of new features. In his weekly mailing list post, Torvalds noticed that things were pretty quiet this week and that this could be due to developers taking a summer vacation or just taking a break following a large merge window a few weeks ago. This isn’t uncommon at this point in the cycle and Torvalds expects more activity next week. Networking and bcachefs dominate changes The second release candidate, despite being small, still brings some notable changes, namely network drivers, Bluetooth drivers, and bcachefs, a copy-on-write filesystem for Linux. The improvements to network drivers have a direct impact on end users, it means that newer networking hardware works out of the box when you install Linux and existing problematic drivers get fixed. There were also improvements made to the Rust infrastructure and core networking changes. Implementing Rust in the kernel is good for users as it has memory safety built in, leaving hackers less to attack in Linux systems. Rust has received backlash by some opinionated Linux developers who don’t want to learn a new language, but it doesn’t look like it’s going anywhere. Under the hood: specific fixes This week, a diverse set of developers have contributed fixes to the kernel that improve kernel stability, Bluetooth connectivity, file sharing over SMB, and virtualization performance. Some specific changes this week include: Fixes for CPU burning, firmware stats, and use-after-free (UAF) issues with the ath11k and ath12k Wi-Fi drivers. Various fixes for UAF, NULL pointer differences and advertising issues in Bluetooth drivers. Improvements to Server Message Block (SMB) related to directory cache reuse and a fix for performance regression with deferred closes. In KVM (Kernel-based Virtual Machine), there are fixes for SEV-SNP support, memory pre-faulting, and ARM64 selftests. The SMB fixes are notable because it's an important protocol in networked Windows environments. It helps with file sharing, printer sharing, and Active Directory integration. By improving Linux’s support for this protocol, readers using SMB in Linux to talk to Windows machines will have a smoother experience. Ongoing development Linux 6.16 is due to get seven or eight release candidates over the cycle so there are now five or six weeks until the stable version arrives. Even when it is out, most people’s first use of this kernel will be when distributions decide to ship it, as they can be tricky to install manually. Stay tuned each week as we bring you all the new changes which each new release candidate.
  • Recent Achievements

    • Explorer
      Legend20 went up a rank
      Explorer
    • One Month Later
      jezzzy earned a badge
      One Month Later
    • First Post
      CSpera earned a badge
      First Post
    • One Month Later
      MIR JOHNNY BLAZE earned a badge
      One Month Later
    • Apprentice
      Wireless wookie went up a rank
      Apprentice
  • Popular Contributors

    1. 1
      +primortal
      625
    2. 2
      ATLien_0
      276
    3. 3
      +FloatingFatMan
      178
    4. 4
      Michael Scrip
      152
    5. 5
      Steven P.
      115
  • Tell a friend

    Love Neowin? Tell a friend!