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. FileCopy in vb6.0

FileCopy in vb6.0

Scheduled Pinned Locked Moved Visual Basic
help
5 Posts 3 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.
  • O Offline
    O Offline
    Otekpo Emmanuel
    wrote on last edited by
    #1

    Hello friends! Please help me out of this stuff. I have the following code to copy files from one folder to another in vb6.0. FileCopy App.Path & "C:\mywork\dbase.mdb", App.Path & "C:\newfiles". From the code, mywork is the folder that contains the file I want to copy, and newfiles is the destination folder. But when I click on the copy button, it shows runtime error, Path not found. Please any help will be appreciated.

    D V 2 Replies Last reply
    0
    • O Otekpo Emmanuel

      Hello friends! Please help me out of this stuff. I have the following code to copy files from one folder to another in vb6.0. FileCopy App.Path & "C:\mywork\dbase.mdb", App.Path & "C:\newfiles". From the code, mywork is the folder that contains the file I want to copy, and newfiles is the destination folder. But when I click on the copy button, it shows runtime error, Path not found. Please any help will be appreciated.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Re-read what you just posted. You're prepending App.Path to the hardcoded path of "C:\mywork\dbase.mdb" and "C:\newfiles". What's the value of App.Path?? What would the complete paths look like if you prepended that value to both of the paths you specified?? Does those results look like valid file/folder paths to you??

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      O 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Re-read what you just posted. You're prepending App.Path to the hardcoded path of "C:\mywork\dbase.mdb" and "C:\newfiles". What's the value of App.Path?? What would the complete paths look like if you prepended that value to both of the paths you specified?? Does those results look like valid file/folder paths to you??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        O Offline
        O Offline
        Otekpo Emmanuel
        wrote on last edited by
        #3

        Hello Dave, thanks for your reply. Please can you help me out to solve it, because I really need it.

        D 1 Reply Last reply
        0
        • O Otekpo Emmanuel

          Hello Dave, thanks for your reply. Please can you help me out to solve it, because I really need it.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I've told you exactly what to look at so you can solve it yourself. This is VERY easy to solve, if you have any debugging knowledge at all. Click on the FileCopy line, set a breakpoint on it (under the Debug menu) and run your code. When it gets to this line, the code will stop. You can then use the Visual Studio debugger to look at the values of variables. I can't tell you exactly what the line should read because only YOU know exactly what you want this code to do.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          1 Reply Last reply
          0
          • O Otekpo Emmanuel

            Hello friends! Please help me out of this stuff. I have the following code to copy files from one folder to another in vb6.0. FileCopy App.Path & "C:\mywork\dbase.mdb", App.Path & "C:\newfiles". From the code, mywork is the folder that contains the file I want to copy, and newfiles is the destination folder. But when I click on the copy button, it shows runtime error, Path not found. Please any help will be appreciated.

            V Offline
            V Offline
            vbmike
            wrote on last edited by
            #5

            From your post it would seem that leaving off the App.Path and just using the actual file locations would work for you. i.e, FileCopy c:\mywork\dbase.mdb, c:\newfiles. That is, if the mywork directory is under C:\ and it is truly not under your apps working directory. Typically the debugger will let you know what is failing so you should look at that as you program when things do not work. ;) You may have to show more actual code here to have someone help you.

            vbmike

            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