Using XCOPY to use zip up a folder using Windows intergrated zip?

Soldato
Joined
4 Aug 2004
Posts
2,734
Location
on OCUK
Hey all,

As title am just wondering if there is any way to use XCOPY to compress a folder so its output is a .zip..I know this can be done using winrar, etc but ideally want to use the windows intergrated zip..

Is this possible? I cant seem to find the exe for the zip..

(edit found this to be compact.exe but the output is not a .zip :(

for example:

compact C:\Progra~1\Test\ why wont it work :/

Any help will be appreciated..:)

Sorry please delete moved to html programming forum.
 
Last edited:
I'm afraid you're on the wrong track there: compact.exe is used to compress files on a file-by-file basis using the NTFS's own native compression. XCOPY won't do any compression of any kind, unless of course you're using it to copy files to an already existing NTFS compressed volume.

AFAIK Windows' own built-in zipfile management is all done through the Explorer shell (if you don't have a third-party extension doing the job), and there's no command-line capability as such.

I think you'll really need something like 7-Zip, eg: " 7z a -tzip Test.zip C:\Progra~1\Test\*.* -r ". Winzip and Winrar also have their own command-line utilities if you prefer. :)
 
Back
Top Bottom