General information
Category:
Coding, syntax & commands
Foxpro is not very effective at cleaning up temp files. The temp files folder acquires more and more files over time. I have written a proc to clean up the temp folder upon entering my app. It looks like this:
ApprDir = sys(5) + curdir()
Tempdir = sys(2023)
cd (TempDir)
FileCnt =adir(Temps)
on error X = .T.
for Ctr = 1 to FileCnt
erase (Temps[Ctr, 1])
endfor
cd (AppDir)
The "on error" line is just to prevent the display of errors if a file is in use. This code does not work. I am always left in the temp folder not the application folder.
Any ideas?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only