I can't seem to get the unzip script to work. It doesn't do anything when it gets to it. Here is the script so far.
proc unzip
param string tempstr ;passing the name of the zip file.
string sPWZipPath, sCmdLine, sTargetPath, sZipName, sSourceFile,tempstr2
integer iRunTaskID
sZipName = "PWZIP.EXE"
sPWZipPath = $PWTASKPATH ;Setup the needed paths
sTargetPath = "C:\Nortel Data\" ;Path to unzip ZIP contents to
strfmt tempstr2 "C:\Nortel Data\%s", tempstr
sSourceFile = tempstr2 ;Source ZIP file
addfilename sPWZipPath sZipName ;Build the execute statement
strfmt sCmdLine "%s %s`x01 %s`x01 -o" sPWZipPath sSourceFile sTargetPath
run sCmdLine iRunTaskID ;Run PWZIP
usermsg " I am unziping"
while taskexists iRunTaskID ;Wait for PWZIP to finish
usermsg " I am waiting"
yield
endwhile
usermsg " I am done"
endproc
the script runs to the usermsg's then just goes on, and the file is not unzipped anywhere.
Any help to see what I am missing would be appreciated.
Thanks
To go where no programmer has gone before.