Re: Unzip file using DTS



Hello Jim,
I have installed PKUNZIP.exe and copy and paste your code in activex task of
DTS with change of my directory name. And after executing DTS it says
successful execution of DTS but it is not unzipping the file, pls let me
know, is it the right code. also that dos window is quickly closing so i am
not able to read, how can i keep it open for little longer.

thx



'***********************************************************
' Visual Basic ActiveX Script
'***********************************************************

Function Main()

strCommand = "c:\temp\PKUNZIP test.zip"
Set oShell = CreateObject("WScript.Shell")
oShell.Run strCommand,,true
Main = DTSTaskExecResult_Success
End Function

"Jim Vierra" wrote:

> Code on demand. - just happened to use this the other day.
>
> strCommand = "c:\temp\pkunzip test.zip"
> Set oShell = CreateObject("WScript.Shell")
> oShell.Run strCommand
> --
> Jim Vierra
>
> "mvp" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:74880DBA-F472-4EF8-BD29-6D104A66BB7C@xxxxxxxxxxxxxxxx
> > Hi Allan,
> > Can you pls provide me small code example because i am very new in VB
> > Script
> > coding. I have already installed cmdline version of winzip.. i do have my
> > zip
> > file in C:\Temp\Test.zip, so pls provide me small example of activex
> > script,
> > so that i can create activex task in DTS and test.
> >
> > thx in advance
> >
> >
> > "Allan Mitchell" wrote:
> >
> >> I would call the cmdline version of Winzip or PKZip in an ExecuteProcess
> >> task.
> >>
> >>
> >>
> >> --
> >>
> >> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> >> www.SQLDTS.com - The site for all your DTS needs.
> >> www.SQLIS.com - SQL Server 2005 Integration Services.
> >> www.Konesans.com
> >>
> >>
> >> "mvp" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:EC1C6BF4-0528-45AD-ADED-33584F6CA437@xxxxxxxxxxxxxxxx
> >> > Hello everybody,
> >> > I have one XML file whcih is a zip file, which i do want to unzip using
> >> > DTS
> >> > and then want to load XML into SQL SERVER table, so can u pls let me
> >> > know,
> >> > how can i unzip file using DTS.
> >> >
> >> > thx
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: DTS Package not running
    ... Under the jobs it says executing and it can run for hours. ... When I run the job through DTSRUNUI it runs but when I schedule the ... The DTS does not period. ... >>> can run the jobs that does not have DTS package but if the job is DTS ...
    (microsoft.public.sqlserver.dts)
  • Re: Unzip file using DTS
    ... I still forget that just because we are in a DTS NG the ... The example I gave should work under any script environment. ... The question seemed to come from outside the DTS scripting arena and I didn't want to go down the long road of debugging a first time DTS script. ... Jim Vierra ...
    (microsoft.public.sqlserver.dts)
  • Re: dtsrun.exe hangs before complete
    ... there fore it would need to be whereever the package is executing. ... www.SQLDTS.com - The site for all your DTS needs. ... > DTSRun OnStart: Create table TABLE1 step ... > DTSRun OnFinish: Create table TABLE1 step ...
    (microsoft.public.sqlserver.dts)
  • Re: Unable to execute a DTS with scheduled job
    ... Also remember that DTS is a client application and as such runs on the box that says "go". ... This means you executing a package on ServerA from your Wkstn is very different from you executing a package on ServerA from the server itself. ... Why I read:Cannot open database '', ...
    (microsoft.public.sqlserver.dts)
  • Re: If condition
    ... will always be successfull, I change the precedence constraint value of the ... >> In a DTS I want to transfer data only if some conditions are met. ... >> I use an ActiveX task to check the conditions. ... >> Failure and the step is shown as failed. ...
    (microsoft.public.sqlserver.dts)