Results 1 to 3 of 3

Thread: File Used by Another Process (Timer)

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2010
    Posts
    78

    File Used by Another Process (Timer)

    Hey Everyone -

    I have a little snag. I have this code on a timer
    Code:
     My.Computer.FileSystem.WriteAllText("C:\test\jesterlog.txt", tbLog.Text, True)
    . It runs fine the first time, but when the timer ticks the second time I get the error "The process cannot access the file 'C:\test\jesterlog.txt' because it is being used by another process." Is there a simple way to just close the file? This seems very simple but I'm not seeing a clear cut way to just dispose or close the file. Thanks!
    Last edited by WRCREX; May 22nd, 2013 at 08:34 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width