Greg,
The files collection has Add() method but not Remove(). The File object has Remove() method. You have to get reference to the file object that represent the file you want to delete. Something like
For Each loFile in VFP.ActiveProject.Files
IF Upper(loFile.Name) = UPPER("c:\vfp\bmps\abc.bmp")
loFile.Remove()
ENDIF
Endfor
>Why am I getting a OLE error code when I run this code. The file exists in both
>my project and in the directory. Files.add works.
>
>_VFP.ActiveProject.Files.remove("c:\vfp\bmps\abc.bmp")
>
>Thanks,
>
>-Greg
--sb--