Script to backup .bkf file

Discussion in 'Scripting' started by Klyde, Jul 30, 2003.

  1. Klyde

    Klyde Guest

    I'm trying to use this script to backup a .bkf file:

    Const OverwriteExisting = True
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    objFSO.CopyFile "C:\FSO\ScriptLog.txt" , "D:\Archive\",
    OverwriteExisting

    I've changed the file name and destination but
    get "permission denied, Line 3" Can anyone help?
     
    Klyde, Jul 30, 2003
    #1
    1. Advertisements

  2. Klyde

    klyde Guest

    Nope, its not running.

     
    klyde, Jul 30, 2003
    #2
    1. Advertisements

  3. Klyde

    MadDHatteR Guest

    Um... why not just use the copy /y command (as part of a .cmd or .bat file)?

    \\ MadDHatteR
     
    MadDHatteR, Jul 31, 2003
    #3
  4. Klyde

    klyde Guest

    Good idea. Tried it, but the bat file just stays open,
    doesn't close. THen when I tried restoring from it it says
    that the file is corrupt.
     
    klyde, Jul 31, 2003
    #4
  5. Klyde

    Yoann Roman Guest

    I'm trying to use this script to backup a .bkf file:
    Have you tried doing the same operation manually to make sure you have
    permission to the file you're copying and the destination you're copying to.
     
    Yoann Roman, Aug 1, 2003
    #5
  6. Klyde

    MadDHatteR Guest

    Can't say for sure, but it sounds like you're not giving the computer long
    enough to copy the file. The .bat file should stay open until the file is
    completely copied, which for a large .bkf file may take a rather long time.
    When done copying, it will return your command prompt, or (if you ran by
    double-clicking instead of typing from command prompt) close.

    \\ MadDHatteR
     
    MadDHatteR, Aug 1, 2003
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.