How to run compact via command line or vbscript

Posted on 2006-03-30
Last Modified: 2008-02-20

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

thanks in advance !
Question by:HumanScaleDev
    LVL 59

    Expert Comment

    Here is the syntax of the Compact command:

    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 is.  This would try to compress the directory c:\sqltest\Testexcelfilecopy.dtsx AND the file, if I read the syntax on the linked page above correctly.  The names of the folder and file would be unchanged.
    LVL 59

    Accepted Solution

    Yes, the Compact command compression and WinZip-like compression offered in XP are different things.  See this page:
    LVL 59

    Expert Comment

    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.
    LVL 59

    Expert Comment

    HumanScaleDev, isn't your question answered?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Title # Comments Views Activity
    XP Pro desktop dropping itnernet connection 11 111
    Upgrade or retire 8 92
    outlook PST max size limit 3 89
    Rebuilding Hive in Windows XP Pro. 17 82
    cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
    Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
    This video discusses moving either the default database or any database to a new volume.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now