>>Does FoxPro have a command that will allow changing of the attributes on a file ? Or can I delete a read only file in FoxPro. The files I need to delete are BMP picture files.
>>
>>Thanks
>
>
RUN attrib *.bmp -r
>ERASE *.bmp
>
>or use the FileSystemObject
>
oFSO = CreateObject("Scripting.FileSystemObject")
>oFolder = oFSO.GetFolder("c:\mypath\bmps")
>FOR EACH oFile IN oFolder
> IF UPPER(JUSTEXT(oFile.Name))="BMP"
> oFile.Delete(.T.)
> ENDIF
>ENDFOR
>
>Of course, any of this code should be modified to delete only the desired BMP files :)
Or use the Windows API SetFileAttributes() function.