[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 871
  • Last Modified:

How to run compact via command line or vbscript

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 !
0
HumanScaleDev
Asked:
HumanScaleDev
  • 4
1 Solution
 
LeeTutorretiredCommented:
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.
0
 
LeeTutorretiredCommented:
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
0
 
LeeTutorretiredCommented:
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.
0
 
LeeTutorretiredCommented:
HumanScaleDev, isn't your question answered?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now