| Author |
How to launch a process synchronously in my DTS
|
|
|
| I am calling a WINZIP process to extract a zipped file using the code below
:
Set oShell = CreateObject("WScript.Shell")
strCommand = "WZUNZIP.EXE" & " -e -o- " &
DTSGlobalVariables("gLocalImportFolder").Value & "\" & file & " " &
strTempUnZipFolder
oShell.Run strCommand
The problem is that I am calling this process several times by iterating
through a collection of zipped files and because the process is called
asynchronously inside the iteration when the process is called whilst the
unzipping process is not finished the control gose to the next commad which
is moving the file to another folder and it is causing me a problem.
Is there a workaround for this?
Thanks
| |
| Darren Green 2005-07-26, 3:24 am |
| Run Method
(http://msdn.microsoft.com/library/d...ml/wsmthrun.asp)
Look at the bWaitOnReturn parameter.
--
Darren Green
http://www.sqldts.com
http://www.sqlis.com
"J-T" <J-T@nospam.com> wrote in message
news:Ovb5TQWkFHA.3960@TK2MSFTNGP12.phx.gbl...
>I am calling a WINZIP process to extract a zipped file using the code below
>:
>
> Set oShell = CreateObject("WScript.Shell")
> strCommand = "WZUNZIP.EXE" & " -e -o- " &
> DTSGlobalVariables("gLocalImportFolder").Value & "\" & file & " " &
> strTempUnZipFolder
> oShell.Run strCommand
>
> The problem is that I am calling this process several times by iterating
> through a collection of zipped files and because the process is called
> asynchronously inside the iteration when the process is called whilst the
> unzipping process is not finished the control gose to the next commad
> which is moving the file to another folder and it is causing me a problem.
>
>
> Is there a workaround for this?
>
> Thanks
>
| |
|
|
|
|