|
-
February 11th, 2009, 08:38 PM
#8
Re: Killing a file (Workaround)
UAC is off. I used “timer” and “sleep” in the loop and without loop. Unless if I debug, or close the IDE, I can't delete the file. When I run the same code over and over again, it's random that file gets deleted.
I worked this thing around for now
Each time program runs that code, it creates a session. Each session number is unique and it also creates temporary pst file such as 0001.pst 0002.pst etc. What I did is, anytime program returns "0" error code when it tries to delete, I assume I can delete all the leftover pst files and I just kill everything in the batch folder with pst extension.
This seems like working fine. Leftovers are not harmful, although this is only a workaround, not the fix... I have to live with it for while 
Thanks all for your replies, if you have any other solutions, please let me know.
Leo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|