neojoker Posted August 23, 2006 Share Posted August 23, 2006 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. Link to comment Share on other sites More sharing options...
JRosenfeld Posted August 24, 2006 Share Posted August 24, 2006 Command line guide for XP: http://www.microsoft.com/resources/documen...s.mspx?mfr=true look at compact. Link to comment Share on other sites More sharing options...
neojoker Posted August 24, 2006 Author Share Posted August 24, 2006 That looks like the actual NTFS compression. I'm wanting to use Zip files. Or maybe I just read it incorrectly. :) Thanks. Link to comment Share on other sites More sharing options...
Digitalx Posted August 24, 2006 Share Posted August 24, 2006 DOS's pkzip B) too bad it lives on in windows 98 and not in xp Link to comment Share on other sites More sharing options...
JRosenfeld Posted August 24, 2006 Share Posted August 24, 2006 (edited) 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 August 24, 2006 by JRosenfeld Link to comment Share on other sites More sharing options...
brand Posted August 24, 2006 Share Posted August 24, 2006 (edited) 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 August 24, 2006 by bigflavor Link to comment Share on other sites More sharing options...
John Veteran Posted August 24, 2006 Veteran Share Posted August 24, 2006 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)... Link to comment Share on other sites More sharing options...
brand Posted August 24, 2006 Share Posted August 24, 2006 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? Link to comment Share on other sites More sharing options...
MazX_Napalm Posted August 26, 2006 Share Posted August 26, 2006 7 Zip has command line functionality. And its free. Link to comment Share on other sites More sharing options...
Bananashake Posted May 6, 2008 Share Posted May 6, 2008 Yeah, but he doesn't want to use an external program and want the internal Zip tool to do that. Link to comment Share on other sites More sharing options...
Dick Montage Posted May 6, 2008 Share Posted May 6, 2008 I use Winzip with the command line addon. I understand that it's an external program, but hey - just a suggestion. Link to comment Share on other sites More sharing options...
+BudMan MVC Posted May 6, 2008 MVC Share Posted May 6, 2008 (edited) 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 May 6, 2008 by BudMan Link to comment Share on other sites More sharing options...
Dick Montage Posted May 6, 2008 Share Posted May 6, 2008 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: Link to comment Share on other sites More sharing options...
+BudMan MVC Posted May 6, 2008 MVC Share Posted May 6, 2008 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. Link to comment Share on other sites More sharing options...
Dick Montage Posted May 6, 2008 Share Posted May 6, 2008 Thanks, sorry missed the resource kit. My bad! Link to comment Share on other sites More sharing options...
Recommended Posts