We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

How to run compact via command line or vbscript

HumanScaleDev
on
Medium Priority
902 Views
Last Modified: 2008-02-20
All,

I am trying to zip a file from a sql2005 ssis package and within that package I can either runa  command line or vbscript to comapct / zip a file.

When I try to simply zip a file via command line and not through the sql package the command executes but sais o files were compressed. here is the command line i am using, any help is greatly appreciated.

Compact /c c:\sqltest\Testexcelfilecopy.dtsx test.zip

thanks in advance !
Comment
Watch Question

LeeTutorretired
CERTIFIED EXPERT
Top Expert 2009

Commented:
Here is the syntax of the Compact command:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

I am pretty sure that the compact command does not compress files into a .zip file.  What it does is compress files or folders using NTFS compression.  Note from the syntax that there is no destination file specified, which I presume your test.zip is.  This would try to compress the directory c:\sqltest\Testexcelfilecopy.dtsx AND the file test.zip, if I read the syntax on the linked page above correctly.  The names of the folder and file would be unchanged.
retired
CERTIFIED EXPERT
Top Expert 2009
Commented:
Yes, the Compact command compression and WinZip-like compression offered in XP are different things.  See this page:

http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=427

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
LeeTutorretired
CERTIFIED EXPERT
Top Expert 2009

Commented:
I don't believe XP's built-in zip compression has a command line interface; at least I haven't been able to find one in some rather extensive google searches.
LeeTutorretired
CERTIFIED EXPERT
Top Expert 2009

Commented:
HumanScaleDev, isn't your question answered?
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.