Results 1 to 6 of 6

Thread: File.Move??

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    File.Move??

    I am using the File.Move method to move a file from one location to another...

    But when I try to run it I get exception saying that the "moveto"-file is in use by another process... how can it be used when it doesn't even exist???????? I assume that the move method creates a new file... I am totally confused...

    kind regards
    Henrik

    ps Are there any other methods I can use for deleting and moving files excemt the ones in the File-class??? ds

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    hmm? how do u want to move a thing that doesnt exist?
    \m/\m/

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    It complained that the "target" file didn't exist.. and of course it doesn't...


    anyway, problem solved...

    kind regards
    Henrik

  4. #4
    New Member
    Join Date
    Aug 2002
    Posts
    10
    Originally posted by MrNorth
    It complained that the "target" file didn't exist.. and of course it doesn't...


    anyway, problem solved...
    I'm having this same problem. Would you mind sharing how you resolved it?

    Thanks
    Brad

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    I simply forgot to close the streamwriter/reader handle before removing file. In that case it was still "in use" and couldn't be removed...

    kind regards
    henrik

  6. #6
    New Member
    Join Date
    Aug 2002
    Posts
    10
    Thanks for the response. I am closing the file but still get this error. I must be missing something else.

    thanks
    Brad

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