How to move Anki data files to usb where Anki is installed

After installing Anki onto usb D drive, I read and re-read Managing Files - Anki Manual and followed the instructions but to no avail. The Anki data files are still created in C:\Users\NEC-PCuser\AppData\Roaming\Anki2. What should I do to move the data files under this directory to Anki directory in Drive D,

Works for me. What does the console say when you execute the .bat file?

Thanks for your quick inquiry. To check what the console exactly say when I execute the .bat file, I tried to execute the file again, and a strange thing happened. When I tried the same procedure, the console repeated the message that it had failed to execute the file or something. I’m afraid I cannot recall the exact wording. But this time, no error message came up, and Anki was launched smoothly!! But, here’s a mystery: When I checked C:\Users\NEC-PCuser\AppData\Roaming\Anki2, I found no Anki data files! They had all gone. All I could find were: addons 21 (Dir), user1 (Dir) crash.log, prefs21.db, and README.txt. I rushed to check Drive D to look for the missing Anki data files, but there are none, And yet, Anki is working all right with the decks and cards. Where have all the data files gone??

After close searching, I’ve found Anki data files in Drive C in the directory user1. The directories and files I found are: backups (Dir), (Dir), collection.anki2, collection.log, collection.mediadb2, and deleted.txt. So, Anki data files are still in Drive C, and no /ankidata directory is made in Drive D, as the manual says.

After trying many times, I’ve finally found what was wrong. When I installed Anki onto Drive D, I created (manually) a directory named \Anki. Then, Anki automatically created another directory /Anki in the directory /Anki that I had created. So, the content of the Anki.bat should have benn “d:\anki\anki\anki.exe -b d:\ankidata,” instead of “d:\anki\anki.exe -b d:\ankidata” as the manual instructions recommend. When I ran the revised Anki.bat, Anki was successfully launched, but with a blank deck. So, I copied the Anki data files in the directory \user 1 into the newly and automatically created d:\ankidata. I lauched Anki again, but to my great disappointment the deck was still blank. Please tell me what should I do to make the Anki data usable. The usb where Drive D is lodged is formatted exFAT. The Manual says it should be formatted NTFS. Is that the reason why the decks and cards do not appear in Anki?
N.B. The Anki I thought I launched I successfully with Anki.bat was actually Anki.exe itself. That’s why Anki showed decks and cards as before. It was simply showing the data stored in Drive C.

I copied everything on Drive D to Drive E, which is formatted NTFS. Then I formatted Drive D as NTFS. Finally I copied the content of Drive E back to Drive D. I tried to launch Anki through Anki.bat, but again there appeared a blank deck. I wonder why the Anki data files in D:\Ankidata are not read into Anki. I feel really frustrated because I’m sure I’m so near to my goal.

It’s not enough to just copy the contents of a profile folder. Why don’t you just copy the whole Anki2 folder and point the .bat file to it?

1 Like

Thank you very much for your advice. In fact, before I read your post, I had come up with an idea, namely, to utilize the export and import functions of Anki. This is what I did. First, I exported data files as .apkg (Anki deck package) Profile by Profile from Anki installed on Drive C. Then I imported these .apkg files Profile by Profile into Anki installed on Drive D. Because, immediately after launching Anki on Drive D via anki.bat, decks are empty, Anki shows the imported decks and cards exactly as before, i.e. when Anki was running on Drive C. All I had to do was to create or add Profiles in advance with the same names as before . The procedure sounds not at all smart, but it surely worked!

1 Like