erase testxx.pj? CREATE PROJECT testxx nowait TEXT TO lcText NOSHOW do testxx2.prg MESSAGEBOX('test') endtext DELETE FILE testxx.prg DELETE FILE testxx2.prg StrToFile('x = 1','testxx2.prg',0) ?STRTOFILE(lcText,'testxx.prg',0) _vfp.ActiveProject.files.add('testxx.prg') _vfp.ActiveProject.files.add('testxx2.prg') _vfp.ActiveProject.close clear all modify project testxx nowait with _vfp.ActiveProject for each oFile in _vfp.ActiveProject.Files cDir=JustPath(ofile.name) endfor endwith _vfp.ActiveProject.close returnCan you try this code?