Anki.bat files on usb is different from my Anki files on laptop.

Spencer's Avatar


28 Aug, 2015 01:27 PM

I really need someone to help me answer a few question. I downloaded Anki on my laptop and also on usb. I created a file on my usb (Anki.bat) by saving "start /b \anki\anki.exe -b \ankidata". I don't know if I opened the laptopand used the Anki program or theAnki program on the usb and started typing the questions and answers. When I close out my files, how do I save it to the usb or the laptop. Does it automatically do it on both? Thanks

  1. 1 Posted by jim on 03 Sep, 2015 09:25 PM

    jim's Avatar

    You should use a .cmd script so you get the parameter extensions. Here is a better script

    name this file "anki.cmd" and place in anki folder with anki.exe

    pushd $~dp0
    start /b anki.exe -b ankidata
  2. 2 Posted by jim on 03 Sep, 2015 09:33 PM

    jim's Avatar

    Also, you need to make sure that Anki is installed on the USB drive

  3. 3 Posted by Spencer on 10 Sep, 2015 09:38 PM

    Spencer's Avatar


    Thanks for the reply. What does this command do? Why are both of my files not updated the same (the laptop and the usb)? Thanks.


  4. 4 Posted by jim on 11 Sep, 2015 07:57 AM

    jim's Avatar

    pushd : pushes a directory onto the stack (could also use cd)
    the argument %~dp0 is a command extension.
    "d" represents drive letter of argument 0

    "p" represents the path of argument 0, minus the drive

    argument 0 is the cmd file itself

    So the first line sets the working directory to the same directory as the cmd file, which should be in the same directory as your anki.exe, which should be in a folder named anki on your USB drive.

    The second line starts anki with the user date set to a folder name 'ankidata', which is within the same folder

  5. System closed this discussion on 22 Feb, 2016 11:54 PM.

  6. Damien Elmes re-opened this discussion on 23 Feb, 2016 10:50 PM

Comments are closed, but you can start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac