LOCAL lcZipFileName,lcDataPath IF TYPE('oApp')='O' lcDataPath=oApp.DataLocn ELSE lcDataPath='DATA' ENDIF lcZipFileName=ADDBS(lcDataPath)+'AFIles'+SYS(2015)+"_"+TTOC(DATETIME(),1)+".ZIP" strtofile(chr(0x50)+chr(0x4B)+chr(0x05)+chr(0x06)+replicate(chr(0),18),lcZipFileName) oShell=CREATEOBJECT("shell.application") FOR EACH ofile IN oShell.NameSpace(lcDataPath).items oShell.NameSpace(cFileZip).copyhere(ofile) ENDFORCode fails on NameSpace line