Re: shelling out to use pkzip?

Re: shelling out to use pkzip?

 

  

Make sure Pkzip is in the path. If it is, it might take a restart of the
sql service or possibly a reboot for it to recognize the new path. To avoid
having to care about paths at all, explictly put the path before pkzip after
xp_cmdshell.

----- Original Message -----
From: "Conahan, Patrick" <Patrick.[Email Address Removed] <[Email Address Removed] Tuesday, June 11, 2002 2:41 PM
Subject: shelling out to use pkzip?


> I downloaded pkzip 4.0 so that I could zip files from a stored procedure.
> I'm having the obvious problem below. What am I doing wrong? I tried
fully
> qualifying the executable...but that didn't seem to work....
>
> declare @strCMD1 char(100)
> declare @cmd char(50)
> select @cmd = 'master..xp_cmdshell'
> declare @cmd_par1 char(75)
> declare @cmd_par2 char(75)
>
> select @cmd_par1 = rtrim('"PKZIPC test.zip test.txt"')
>
> print (@cmd + @cmd_par1)
>
> exec (@cmd + @cmd_par1)
>
> master..xp_cmdshell "PKZIPC test.zip
test.txt"
>
> output
>
> --------------------------------------------------------------------------
--
> --------------------------------------------------------------------------
--
> --------------------------------------------------------------------------
--
> ----------------------'PKZIPC' is not recognized as an internal or
external
> command,
> operable program or batch file.
>
> (2 row(s) affected)
>
> Patrick Conahan
> Consultant
> Project Implementation &
> Database Support Services
> The TriZetto Group
> Office: 847-887-8080
> Fax: 847-887-8001
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mssqldba-[Email Address Removed] For additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page