Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What are 'TMP' files for and when are they no longer useful?

Status
Not open for further replies.

baltman

Technical User
Mar 5, 2002
1,578
US
I'm developing a dynamic reporting system that generates and runs a great many SQL commands. I see that one of the results is the creation (but not deletion) of dozens on 1k TMP files. What information do these files contain and when do they become irrelevent?

I'd like to know when I would be able to delete these files without it affecting performance.

Can I do something to get VFP to delete them when they are no longer needed?

Thanks,
Brian
 
.TMP files are usually .DBFs created on the fly from generated queries, views, etc. Some are also temporary files created internally by VFP itself on the fly. These are open as long as the VFP session is active. You can't have VFP do a ERASE *.TMP on startup as it would error out trying to delete open files. You can erase all those files in an AUTOEXEC file or some sort of other cleanup routine as long as VFP isn't running. If you use something like ADIR() to get a listing of .TMP files that are older than the current session, you could clean them up that way.

Dave S.
 
You CAN just get an ADIR() listing and delete all of them, trapping the error that will result from any that are open. If they aren't open, they aren't necessary; if they are open, they won't be deleted anyway.
 
Thanks! I just wanted to make sure that VFP didn't go back to one after it was no longer open to check for *something* ...

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top