proc main string sPWZipPath, sCmdLine, sZipName, sTargetPath, sTargetFile, sSourcePath, sSourceMask, sTemp, sTemp2 integer iRunTaskID sZipName = "PWZIP.EXE" sPWZipPath = $PWTASKPATH ;Set up the paths sTargetPath = "c:\My Documents\" ;Path to save ZIP file to sTargetFile = "backup" ;Name to give to ZIP file, do not add .ZIP extension! sSourcePath = $ASPECTPATH ;Path to look for source files sSourceMask = "*.was" ;Filter to use when searching for source files shortpath sSourcePath sTemp ;Convert source path to 8.3 format shortpath sTargetPath sTemp2 ;Convert target path to 8.3 format addfilename sPWZipPath sZipName ;Build execute statement strfmt sCmdLine "%s %s%s`x01 %s\%s `x01 -c" sPWZipPath sTemp2 sTargetFile, sTemp, sSourceMask run sCmdLine iRunTaskID ;Run PWZIP while taskexists iRunTaskID ;Wait for PWZIP to finish yield endwhile endproc