A - try Shell, not Run. Shell will cause Kix to wait for the files to unzip, while Run will not.

B - waiting to turn your small working code into a UDF will actually complicate your process.. when you have a UDF that does what you need, you isolate that from the new code you develop around it.

I STRONGLY recommend the following format for any Run/Shell commands:
 Code:
$Cmd = '%COMSPEC% /c'
$Cmd = $Cmd + ' mycommand.exe /a:' + $ArgInVar
$Cmd = $Cmd + ' /switchA /switchB'
$Cmd = $Cmd + ' >' + $OutFile
; following line for debugging
'About to run the following command: ' ? $Cmd ?
Shell $Cmd

This allows you to build the command step by step, display it before it runs so you can see if it looks right. You can even copy the screen output and paste it into the command prompt to run it.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D