Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Orphan TMP files
Message
From
10/03/1999 18:34:47
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00195946
Message ID:
00196147
Views:
30
>As you know, when you create a cursor with CREATE CURSOR, Foxpro creates a TMP file in the temp directory. And when you close the cursor, Foxpro deletes the TMP file. Great. But if you do ALTER TABLE on that cursor, Foxpro won't delete the TMP file when you close the cursor. I found this out the hard way when a user had over 14,000 file in her TEMP directory!
>
>I didn't see anything about this on Microsoft knowledgebase. Does anyone know why this happens? Is it a bug? It happens in 3.0b and 5.0a

If VFP crashes, the TMP files will also get left behind. Through experience, I've found the following solution works best:

- Point Fox temp files to C:\FOXTEMP

In the autoexec.bat, do:

DELTREE /Y C:\FOXTEMP
MD C:\FOXTEMP

This way, everytime the user boots, the files are cleaned up. Note that my experience shows this to be a better solution than just deleting the files.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform