Results 1 to 4 of 4

Thread: FileCopy Question *SOLVED*

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Question FileCopy Question *SOLVED*

    I have an option for the user to make a backup of the database into the directory C:\Backup. This is fine. My question is when I want to copy the backed up database into the application folder do I have to specify the full directory path or can I use something like this "App.Path & "\database.mdb"?

    Below is the current code I'm using.
    Code:
    Private Sub mmuBackupsRestore_Click()
    Const Directory = "C:\Backup"
    Const File = "database.mdb"
    Dim FSO As Object
    FileCopy "C:\Backup\database.mdb", "C:\Program Files\KidsSpace\database.mdb"
    Last edited by lintz; May 19th, 2003 at 08:49 PM.

  2. #2
    Fanatic Member Armbruster's Avatar
    Join Date
    Sep 2002
    Location
    Maryland Heights, MO
    Posts
    857

    Re: FileCopy Question

    Originally posted by lintz
    can I use something like this "App.Path & "\database.mdb"?
    Yes!
    "Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!

    Resistance is futile, you will be compiled . . . Please!

  3. #3
    Fanatic Member
    Join Date
    Feb 2003
    Location
    Los Angeles, CA
    Posts
    681
    note that if you only do a FileCopy, you dont need the file system object.
    there are 2 reasons why i leave my work unfinished:
    (1) i'm getting old.

  4. #4

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697
    Thanks. It now works using the below.

    Code:
    FileCopy "C:\Backup\database.mdb", App.Path & "\database.mdb"

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