Results 1 to 2 of 2

Thread: copying file?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    91

    copying file?

    i have a file in my bin folder that i want copied to the path C:\Windows\System

    how?

  2. #2
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    Did you do a search before you posted? If you didn't, you should. I believe this has already been answered a few times before.

    Although I suggest using System.IO because that has some really good file stuff you can do.

    Use:
    System.IO.File.Copy(strOriginalFile, strNewPath, true)

    and put the file you want copying in strOriginalFile
    and strNewPath where you want want to copy the file to.

    The boolean on the end specifies whether or not you want to overwrite the file if it already exists. Set it to false if you don't want to

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