Running Anki from a Flash Drive

Having installed Anki 25.07.5 and followed the instructions in order to run Anki as a portable application, I found that the script “anki.bat” doesn’t work.

Actually I created the folder “Anki” in the folder “Anki25_07_5” in the USB drive L, so I edited the text file as follows:

l:\Anki25_07_5\Anki.venv\scripts\pythonw -c ‘import aqt; aqt.run()’ -b l:\Anki25_07_5\Anki\ankidata

Have I done something wrong?

Thank you!

1 Like

Where exactly did you put the files? Maybe you put it at l:\Anki25_07_5\\Anki\.venv\scripts\pythonw instead? Basically make sure your paths are correct. And if you can’t figure it out, please post the exact error instead of saying that it “it doesn’t work”.

1 Like

I copied the files of the AnkiProgramFiles folder to the folder l:\Anki25_07_5\\Anki of the flash drive and created the text file anki.bat with the text l:\Anki25_07_5\Anki\.venv\scripts\pythonw -c 'import aqt; aqt.run()' -b l:\Anki25_07_5\Anki\ankidata. But, after running it, nothing happens. That’s what I mean saying “it doesn’t work”. What is the exact error that I am supposed to post? Is the text I wrote in the anki.bat wrong?
Thank you!

I tried it on mine too, and nothing happens!

start /b g:\anki\anki.exe -b g:\ankidata

This is what the manual used to suggest. It still works in the latest beta version. Version ⁨25.08b5 (d4862e99)⁩

Thanks, I’ll try that.
By the way, does this also work for addons?
And how do you update to a new version afterwards?

Yes, that used to be the case, but the new instructions have changed the structure of the anki.bat text file. I tried adding start /b in front, but again nothing happened.

What exactly have you tried? Write the full instructions.

I wrote start /b l:\Anki25_07_5\Anki\.venv\scripts\pythonw -c 'import aqt; aqt.run()' -b l:\Anki25_07_5\Anki\ankidata, but it didn’t work.
Instead the instructions in Anki manual (unfortunately I am not allowed to add links in my posts here) are the followings:

Running from a Flash Drive

On Windows, Anki can be installed on a USB / flash drive and run as a portable application. The following example assumes your USB drive is drive G. Please ensure you’ve read the Program Files section above first.

  • Copy the AnkiProgramFiles folder to the flash drive, so you have a folder like G:\Anki.
  • Create a text file called G:\anki.bat with the following text:g:\anki\.venv\scripts\pythonw -c 'import aqt; aqt.run()' -b g:\ankidata
  • Double-clicking on anki.bat should start Anki with the user data stored in G:\\ankidata.