use MyProject.pjx packshould be equivalent to selecting the "Pack" option from the project menu.
clear all && close class libraries. set procedure to vfxfunc && for GetArgCount() and GetArg(). CreateObject("cMyProjectLoop") DEFINE CLASS cMyProjectLoop as cProjectLoop cFileFilter = "report" lIncludeOrExclude = "I" ENDDEFINE * Loop some action for selected files in a project DEFINE CLASS CProjectLoop as Custom cType = "K" && K = form. May be overwritten in inherited class. cFileFilter = "report;batch;vfx" && files to include or exclude lIncludeOrExclude = "E" && determines usage of .cFileFilter oFile = NULL FUNCTION INIT set exact off local lnFileCount, llInclude, lnI lnFileCount = Application.ActiveProject.Files.Count FOR EACH This.oFile IN Application.ActiveProject.Files if This.oFile.Type = This.cType llInclude = (This.lIncludeOrExclude = "E") for lnI = 1 to GetArgCount(This.cFileFilter) if upper(justfname(This.oFile.Name)) = upper(GetArg(This.cFileFilter, lnI)) llInclude = (This.lIncludeOrExclude # "E") exit endif next if llInclude This.Action() && Action to be performed on each file endif endif ENDFOR This.oFile = NULL ENDFUNC FUNCTION Action * Action to be performed on each file. * Default action: modify file. May be overwritten. This.oFile.Modify() ENDFUNC ENDDEFINE *!* Codes for file types: *!* d Database *!* D Free Table *!* Q Query *!* K Form *!* R Report *!* B Label *!* V Visual Class Library *!* P Program *!* L FLL *!* Z APP *!* M Menu *!* T Text *!* x Other