PROCEDURE ExcludeFile LPARAMETER tcFileName LOCAL loProject, loFile, lcFileName lcFileName = LOWER(JUSTSTEM(tcFileName)) loProject = _VFP.ActiveProject FOR EACH loFile IN loProject.Files IF LOWER(JUSTSTEM(loFile.Name)) == lcFileName THEN IF NOT loFile.Excluded THEN loFile.Excluded = .T. ENDIF ENDIF ENDFOR RETURN ENDPROCNow if you were to create a meta data table containing the file names you want to exclude and use a project hook, you could make sure all the necessary files are excluded in the hook's BeforeBuild event.