Menu

Backup KeePass DBs from network drive

Help
Jack
2014-12-23
2014-12-27
  • Jack

    Jack - 2014-12-23

    I have a small thumb drive plugged into my router where I keep my two KeePass DBs. This keeps both DBs accessible to both computers on the network. I wanted to be able to backup those files to my desktop using Task Manager to run a batch file to accomplish the copy routine. The command to execute the copy routine is: copy \\router\drive(A1)\ (folder name)\*.*. When that line is executed I get this error: The system cannot find the file specified.. Even if you manually type cd \\router on a command line to change directories you get this message: CMD does not support UNC paths as current directories. I even tried mapping the thumb drive to drive Z which seemed successful but then I never could access drive Z.

    Is there simply no way to do this automatically or am I missing something?

    TIA,
    Deuxdad

     

    Last edit: Jack 2014-12-23
  • Paul

    Paul - 2014-12-24

    It depends on how the router provides access to the files. It is probably just an SMB store so any standard file access should work. What you can't do, because it's a network share, is use the DOS CD command.
    Try the copy command, enclosing the full path in quotes, e.g. copy "\router\drive(A1)(folder name)*.*"
    To test access to the share try the DOS DIR command in stages. e.g.
    dir \router\drive
    dir \router\drive\folder
    dir \router\drive\folder\file.ext

    cheers, Paul

     
  • Jack

    Jack - 2014-12-26

    Thanks Paul. I was finally able to get the COPY command working by composing the command as follows: copy "\\router\drive(a1)\keepass data files\*.kdb" c:\users\jack\documents\keepas~1. For reasons of which I'm not sure, I had to resort to a "short file name" in the destination. I suspect however that it's because the source address is enclosed in quotes and the destination address is not.

    In any event, thank you. It's un-likely I would have figured it out without your help.
    Deuxdad

     
  • Paul

    Paul - 2014-12-27

    You can enclose the destination in quotes too.
    copy "\router\drive(a1)\keepass data files*.kdb" "c:\users\jack\documents\keepass data files"

    cheers, Paul

     

Log in to post a comment.