Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Copy Files from one directory to another

Copy Files from one directory to another

Scheduled Pinned Locked Moved Visual Basic
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    samsonx
    wrote on last edited by
    #1

    Hi, I have one directory eith files and i want to copy one filr from that directory to another. For that i used the following code but it doesn't work. Import System.IO Filecopy(sourcepath, destinationpath) Please let me know, here additionally i need to add any code... Thanks in advance

    Regards, Samson

    C 1 Reply Last reply
    0
    • S samsonx

      Hi, I have one directory eith files and i want to copy one filr from that directory to another. For that i used the following code but it doesn't work. Import System.IO Filecopy(sourcepath, destinationpath) Please let me know, here additionally i need to add any code... Thanks in advance

      Regards, Samson

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, where did you get this syntax from ? File.Copy will work. Filecopy will not, for obvious reasons.

      Christian Graus Driven to the arms of OSX by Vista.

      S 1 Reply Last reply
      0
      • C Christian Graus

        Well, where did you get this syntax from ? File.Copy will work. Filecopy will not, for obvious reasons.

        Christian Graus Driven to the arms of OSX by Vista.

        S Offline
        S Offline
        samsonx
        wrote on last edited by
        #3

        This also showing error like Could not find the part of the path

        With Regards, Samson

        C 1 Reply Last reply
        0
        • S samsonx

          This also showing error like Could not find the part of the path

          With Regards, Samson

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I am not sure that File.Copy will create directories that do not exist. Otherwise, if your paths exist, it should work fine ( of course, assuming the dest file does not exist, if it does, you need to pass true as the third param )

          Christian Graus Driven to the arms of OSX by Vista.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups