Help with zipping up files by using xp_cmdshell

  • ????

  • From a command prompt you should be able to execute winzip /? and see the command line switches you can use to suppress the Y|N.  Also you can probably go to http://www.winzip.com and get a copy of the manual for the command line switches OR you can review the help file that came with WinZip to see the command line switches and how to suppress the messages.

     



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Hello,

    Use 7Z, very good tool, with a better compression rate than WinZip. Moreover, there is a command line very easy to use. http://www.7-zip.org

    Bye

  • I have had success in VB7 with Winzip 8.0 and the necessary add-on wzcline.exe. The latter is to allow cmd line interface to the windows app. Both .exe’s must be running on the machine you are using. My shell to unzip password protected zip files is as follows..

    objShell = CreateObject("WScript.Shell")

    objShell.run(strCommandLine)

    strCommand = "wzunzip " & "-o -s" & ControlChars.Quote & strPassword & ControlChars.Quote & " " & strFileNames & " " & strFileDir


    MISfIT

  • I've used winzip 9.0 for this before.  There's a free commandline utilitiy you can download online.

    For this to work with cmdshell though, winzip must be licensed.  If not, when you run it from the command line, you'll get the same prompt you do from the GUI "Evaluation... agree, disagree, purchase...", and you have to type in the corresponding letter.

    If you try and do this from sql, you of course don't see the command prompt, so there's no way to push the corresponding character, and the proc will appear to hang.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply