Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy memo fails if file exists
Message
From
10/11/2011 18:01:09
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01513136
Message ID:
01528632
Views:
34
>>>I don't want to suggest but I think it may have something to do with the fact that you run app via Citrix. Just a hunch.
>>
>>Your problem reminds me of a problem I had on my web server where the program created random files and wanted to delete them, but couldn't. The problem was that the OS didn't let me delete a file immediately after I released all handles to it. My solution was to check for files older than a few minutes and delete them, every time I created a new file.
>
>Interesting. I did find out that the problem is indeed in the ERASE (file) code. So, I trap it and also added deletion in form's destroy (also trapped).
>
>In the very worse scenario the user will end up with lots of temp files, although I believe we clean this directory when we exit the application.

I always store the temp files locally, and with a characteristic extension or part of the name, so they are easy to distinguish. So a simple adir to find the old files, and a simple loop to delete them, is all you need. As mentioned, I delete the old files in the same procedure I use to create the new temp files.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform