*============================================================================== * Program: LISTMISSINGFILES.PRG * Purpose: Make a list of files in one project that aren't in another * From: Practical Tips for Working with Existing Code * Copyright: (c) 2007 Tamar E. Granor, Ph.D. * Last revision: 03/21/07 *============================================================================== LPARAMETERS cOldProject, cNewProject LOCAL oOld as VisualFoxpro.IFoxProject, oNew as VisualFoxpro.IFoxProject MODIFY PROJECT (m.cOldProject) NOWAIT oOld = _VFP.ActiveProject MODIFY PROJECT (m.cNewProject) NOWAIT oNew = _VFP.ActiveProject CREATE CURSOR Missing (mFile M) LOCAL oFile, oNewFile, cFileName FOR EACH oFile IN oOld.Files * Look for each file from the old project in the new project. * The filename without path is the key in the collection. cFileName = JUSTFNAME(oFile.Name) TRY oNewFile = oNew.Files[m.cFileName] CATCH * Used in old, not in new INSERT INTO Missing VALUES (oFile.Name) ENDTRY ENDFORTamar