I want to copy a directory & all its files to a new directory from within Access 2000

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wrighttrak
    New Member
    • Jan 2010
    • 2

    I want to copy a directory & all its files to a new directory from within Access 2000

    In VBA behind a Command Button I want to copy a directory to a new directory. Ive tried FileCopy but I dont know how to use *.* in that command
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    no need to use *.*

    you need to loop through all the files in the directory and copy them from source to destination.

    Comment

    • vb5prgrmr
      Recognized Expert Contributor
      • Oct 2009
      • 305

      #3
      To add to debasisdas post, you will need to know these commands that you can look up in help...

      Dir Function
      Name Statement or FileCopy Statement along with the Kill Statement (if moving)
      MkDir Statement
      RmDir Statement (if moving)



      Good Luck

      Comment

      • Wrighttrak
        New Member
        • Jan 2010
        • 2

        #4
        Does any one have a simple vba procedure to make a list of the files in a particular directory so it can be used with FileCopy later

        Comment

        • vb5prgrmr
          Recognized Expert Contributor
          • Oct 2009
          • 305

          #5
          Time to use your friends (yahoo, google, ask, answers, bing) to search for vb6 dir function, or you could use the example that should be in the help files for vba (don't know if it is still there or not)...



          Good Luck

          Comment

          Working...