Volkmaniac
Technical User
I'm having trouble using the pwzip command with the following script. I replaced the "shortpath" command that was in the original and replaced it with findfirst. It's creating the actual zip file but it's not finding and zipping the files I tell it to. In other words, the backup.zip file is empty.
proc main
string sPWZipPath, sCmdLine, sZipName, sTargetPath, sTargetFile, sSourcePath, sSourceMask, sTemp
integer iRunTaskID
sZipName = "PWZIP.EXE"
sPWZipPath = $PWTASKPATH ;Set up the paths
sTargetPath = "S:\Client Services\LETTERS\" ;Path to save ZIP file to
sTargetFile = "backup" ;Name to give to ZIP file, do not add .ZIP extension!
sSourcePath = $ASPECTPATH
sSourceMask = "*txt" ;Filter to use when searching for source files
findfirst sSourcePath sTemp
addfilename sPWZipPath sZipName ;Build execute statement
strfmt sCmdLine "%s %s%s`x01 %s\%s `x01 -c" sPWZipPath sTargetPath sTargetFile, sTemp, sSourceMask
run sCmdLine iRunTaskID ;Run PWZIP
pause 5
while taskexists iRunTaskID ;Wait for PWZIP to finish
yield
endwhile
endproc
proc main
string sPWZipPath, sCmdLine, sZipName, sTargetPath, sTargetFile, sSourcePath, sSourceMask, sTemp
integer iRunTaskID
sZipName = "PWZIP.EXE"
sPWZipPath = $PWTASKPATH ;Set up the paths
sTargetPath = "S:\Client Services\LETTERS\" ;Path to save ZIP file to
sTargetFile = "backup" ;Name to give to ZIP file, do not add .ZIP extension!
sSourcePath = $ASPECTPATH
sSourceMask = "*txt" ;Filter to use when searching for source files
findfirst sSourcePath sTemp
addfilename sPWZipPath sZipName ;Build execute statement
strfmt sCmdLine "%s %s%s`x01 %s\%s `x01 -c" sPWZipPath sTargetPath sTargetFile, sTemp, sSourceMask
run sCmdLine iRunTaskID ;Run PWZIP
pause 5
while taskexists iRunTaskID ;Wait for PWZIP to finish
yield
endwhile
endproc