Re: Unzip file using DTS
- From: "Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 May 2005 05:57:30 +0000
Good point Jim, I still forget that just because we are in a DTS NG the question could be about anywhere <grin>
I looked back to the original Q and saw this
"...I have one XML file whcih is a zip file, which i do want to unzip using DTS..."
"Jim Vierra" <jvierra@xxxxxxx> wrote in message news:jvierra@xxxxxxx:
Except you are in a DTS session. It will work and provides better control than the shell method but will only work under DTS. The example I gave should work under any script environment. Don't know if the user needed it in DTS. 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
"Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx> wrote in message news:eYzdsDSVFHA.544@xxxxxxxxxxxxxxxxxxxxxxx > Yep. > > I use environment variables al the time as something to pass between > environments so maybe > > Database Name > Server Name > > > Things like that. Real Easy. > > > I addition to using WScript to do the execution we could use the > ExecuteProcess task > > > How to manipulate the Execute Process task. > (http://www.sqldts.com/default.aspx?251) > > > > > "Jim Vierra" <jvierra@xxxxxxx> wrote in message news:jvierra@xxxxxxx: > >> I couldn't resist - it was sitting on my desktop from a previous >> mis-adventure so I just cut out the fat an voila'! >> >> Ended up learning something too. Setting environment variables from >> script >> is not documented but it can be done. >> >> WshEnvironment("VARNAME") = "var_setting" >> >> Won't persist outside the script scope but is useable for passing vars in >> a >> script or for changing the environment for provider calls and to alter >> what >> a spawned process see in the environment. >> -- >> Jim Vierra >> >> "Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx> wrote in message >> news:eE8Uf1NVFHA.1040@xxxxxxxxxxxxxxxxxxxxxxx >> > Thanks Jim - the code fairy <grin> >> > >> > -- >> > >> > 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 >> > >> > >> > "Jim Vierra" <jvierra@xxxxxxx> wrote in message >> > news:eV0MDwNVFHA.2128@xxxxxxxxxxxxxxxxxxxxxxx >> >> 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 >> >>>> >> >>>> >> >>>> >> >> >> >> >> > >> > >
.
- Follow-Ups:
- Re: Unzip file using DTS
- From: Jim Vierra
- Re: Unzip file using DTS
- References:
- Re: Unzip file using DTS
- From: Jim Vierra
- Re: Unzip file using DTS
- Prev by Date: Re: can't see my activex code in the activex script task
- Next by Date: Re: Unzip file using DTS
- Previous by thread: Re: Unzip file using DTS
- Next by thread: Re: Unzip file using DTS
- Index(es):
Relevant Pages
|