Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot create program workspace temp files
Message
From
28/07/2014 06:02:19
 
 
To
28/07/2014 05:57:50
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01603693
Message ID:
01604798
Views:
55
Thank you very much, Dragan.

I will use your procedure.

Gerhard

>>Finally found th e reason for my problem:
>>
>>The TEMP dir (%TEMP%) had too many files. I deleted files and all is working fine again.
>>
>>Which leaves as question:
>>
>>How can I automatically delete unnecessary files without "disturbing" programs that rely on one of that files?
>
>Call this on exit:
>
PROCEDURE PurgeTemp
>* 4/9/2001 dragan
>
>	LOCAL lcDir, lcFSpec, lcFsp, lcOnErr, ldDay
>	LOCAL N, aa[1], i
>	lcDir=SYS(2023)
>	lcFsp="*.*"
>	lcOnErr=ON('error')
>	ON ERROR *
>	ldDay=DATE()-3
>	lcFSpec=FORCEPATH(lcFsp, lcDir)
>	N=ADIR(aa, lcFSpec)
>	FOR i=1 TO N
>		IF aa[i,3]<ldDay
>			ERASE (FORCEPATH(aa[i,1], lcDir))
>		ENDIF
>	ENDFOR
>	ON ERROR &lcOnErr
>
>
>The three day limit is to avoid any files which may still be open by some process. If it's in the temp folder and older than three days, I assume it's safe to delete. If it's still used by something, it most probably can't be deleted anyway.
>
>However, this doesn't clear the subfolders below %temp% - but these don't get created daily. They usually crop up only when some software is updated or installed. I delete them manually.
Gerhard Schmidbauer
URANUS Software GmbH
Previous
Reply
Map
View

Click here to load this message in the networking platform