DB_Backup Plugin and Relative App Path

Help
Tom
2005-11-08
2012-11-19
  • Tom

    Tom - 2005-11-08

    I use KeePass on a USB flash drive that routinely gets assigned a different drive letter as I move to different computers.  KeePass works great, but I'd like to store database backups on the flash drive for later removal.  Does anyone know if there's an environment variable that can be used to return the KeePass application path?  Or is there a way to specify a path relative to the KeePass application in the Backup Destinations?

    Thanks for the help!

     
    • Paul

      Paul - 2005-11-10

      I don't know if this helps, but

      The {APPDIR} and %APPDIR% substitution codes are replaced by the application directory path of the currently running KeePass instance. It's the full absolute path of the directory containing the KeePass executable, without a trailing backslash. If you would like to start a new KeePass instance, you could set the URL to:

      cmd://{APPDIR}\KeePass.exe

      cheers, Paul

       
    • Nobody/Anonymous

      Hi Tom,

      You have several possibilities:
      1. Use '.\' as a backup destination. This will put the backup to the same place from where the original database was opened. I presume, your original DB is also on an USB, otherwise why to use the USB?

      If the above is not an option for you (original DB somewhere else than the USB) then here is an alternative:
      2. Start KeePass with parameters. You can do this by placing a small .cmd file on the USB with the following content:
      start KeePass.exe -ext:DB_Backup.Dest="%CD%"

      and use this CMD file to start KeePass.

      If the above choices do not fit you, try to describe your setup exactly and I will try to find a solution.

      Regards,
      Matyas

       
    • Paul

      Paul - 2005-11-24

      Or
      start KeePass.exe -ext:DB_Backup.Dest="%~dp0"

      The %~dp0 will return the drive and path from the program you run.

      cheers, Paul

       

Log in to post a comment.