Hi guys, I need help with moving my Anki drive location out of the OS drive.
I have added an extra hard disk on my PC for storage to keep my OS drive free.
But for some reason I am not able to move the saving folder to the other drive. I have tried the “-b PAth/to/the/folder” method, but it still saves everything to the main OS drive. This is kinda urgent as my C drive is full with plenty of storage left in secondary drive.
To be clear, I want to move all my Anki data to the backup drive, it’s okay if the main software is installed in C drive. I want to do this without having to unisntall and reinstall Anki.
It’s not a direct solution for your problem, but I’d recommend to install “Note Size” addon that can help to find big notes which make your collection huge.
[For reducing the size of your collection in the short-term, also make sure you use Tools > Check Media > deleted unused (and then again to “empty trash”) and Tools > Check Database.]
Can you say exactly how you’re using that method (what steps, what exact text, etc.) and on what OS? Managing Files - Anki Manual
The solution I tried earlier was to change the saving folder (which I found online, don’t remember exactly where, either on reddit or on this forum). I didn’t clearly understand how the solution helped but I did it anyway. This is what I did:
Right click on Anki desktop shortcut > Open Properties > Shortcut tab > in the Target box, added
-b “path/to/the/folder”
The above text was added next to
“path/to/anki.exe”
Then saved it. Although it didn’t make sense to me how’d changing anything in the shortcut would help this in any way. The “path/to/the/folder” I used was the path to the folder on the secondary hard drive that I wanted to use as the saving folder. (Used the actual path and not the above mentioned path, just to be clear, as I’ve seen people replicate the same exact path)
I’m on Windows OS.
For now, I managed the problem by deleting/moving other files on my hard drive and moving all the old Anki clutter that I had kept as a backup to go back to the past if needed (don’t need it anymore so deleted it).
In your “delete unused” solution, does it imply that all media from unused cards would be deleted, or just to the media files which are not linked to any notes (suspended or not)? Because I don’t wanna delete any useful media from notes that I may unsuspend and use in the future.
It’d still be very useful to me if I can use my secondary hard drive as the saving folder, but if that is not possible to do, please let me know.
It works just like if you were running the program by typing it at a command prompt (in a cmd.exe window) and adding some parameters to give the program starting information.
That was going to be my first question! But did you also use backslash \ as your separator (instead of forward slash /? The example in the manual uses a different program folder, but if you have it installed at the default location, what you want would look something like –
“Delete Unused” media will only impact files that are in the media folder, but are not mentioned anywhere in any of your notes – Media - Anki Manual. Anything that is attached to a note is safe, and it doesn’t matter whether the cards for those notes are suspended or unsuspended.
Check Media will first show you a list of all of the files it will take action on, and “Delete” only moves them as far as a “trash” folder, so you can let them sit there and make sure everything still works in your collection. But you won’t get the space savings until you run it again and “Empty Trash”.
are used to start anki on the D drive despite it being installed on the C drive?
I’m sorry, I have very limited (close to none) knowledge about programming and learn when I come across a problem
Haha, never noticed the backslash-forward slash difference. But this error was avoided as I copied the path directly from the explorer (instead of manually typing it). I generally copy path to avoid typos in folder names, so was saved from making this error. So to answer your question, yes, the backslash was used.
Okay, thanks for clearing that up. I used the “Delete unused” option and wow, 6.5 GB worth of files were deleted.
Question. Just to be safe, if I move all files from the media.trash folder into the secondary drive (as backup for when I get any media related error from this), will the “Restore Deleted” option still work if I paste the media back into the media.trash folder?
For now, I’ve restored the deleted media, but will use the “Delete unused” option when I face memory issues again.
Not quite. The program runs on the C-drive where it is installed. But the program points itself to the Anki2 folder you specify on the D-drive.
Okay, something is wrong in your command then. If you can’t spot the difference between what you have and the example I posted – you’re going to have to post the text you’re actually using.
That seems like it entirely solves your problem and you don’t even need to move your Anki2 directory now.
You don’t need to move the media.trash separately from the rest of your profile/collection/settings. While Anki is not running – move your entire Anki2 folder from where it is on the C-drive to where you want it on the D-drive. Then make sure your shortcut command is correct. And then, yes, you can restore that media when you want to. Anki will treat your entire profile just like it did on the C-drive.
I remember now, I must have installed anki on the D-drive when trying to solve this problem. But the Anki2 (including collection media) folder is still on the C-drive. Should I be moving all the Anki2 folder items into the Saving folder (Yes, this is the exact name I used for the folder).
NOTE: I never altered the .exe file path, it’s on D-drive because I installed Anki on D-drive
Yes, but it’d help if the entire directory is on D-drive. Because I won’t have to worry about deleting unused media whenever it builds up.
This worked!
I think I understand this now. I don’t think I moved the Anki2 folder to the new directory before. I did it now, and it seems to have worked.
Also, I don’t remember seeing this step mentioned in the Anki manual, so didn’t do it as I didn’t understand what the -b did until today.
If that’s where your anki.exe is, this will work fine. But once you move your Anki2 folder to this location on the D-drive, you’ll need to change it to -b “D:\ANKI\Saving folder\Anki2”
Oh, actually I just moved the contents of Anki2 folder into the Saving folder, instead of having to change the path. Just to keep the original Anki2 folder at it’s default location for when I want to move the contents back to C-drive (although it’s easy to locate, I just wanna avoid that confusion), if at all the situation arises.
Edit:
I also checked all the Anki shortcuts I use and they seem to open correctly. Also rechecked media and database after everything was done, and had no errors.