Change the Location of the Opera Mail Storage Directory

Store Opera Mail emails in a custom folder

An open well-used white pages telephone book
Caspar Benson / Getty Images

Changing the mail storage database in Opera Mail is useful if you like to keep your email files stored in a specific location, like on an external hard drive with lots of space or in a folder that gets backed up online.

Fortunately, you can make just one small change to the settings in Opera Mail to force the program to use a different folder to store your emails. However, there are some things to be aware of before you start.

Important Information

When you change the default mail directory, Opera Mail will no longer look in the original folder for your emails. This means that once you make the change to use a different location for the mail directory, the email account you were using previously will no longer show up when you open Opera Mail.

However, there's one extremely easy method to importing all of your mail to the new location you choose below, and that is to simply move all the information in the old mail directory to the new one. Then, Opera Mail will work the exact same but will be using a new folder to store emails.

Something else to remember is that if you're using Opera Mail for the first time or with a new account, you should make the directory change as outlined below before you set up the email account. That way, once the folder has been changed, you can use Opera Mail as-is, and any new account you add will have its data stored in the new folder - there's no need to do any copying.

Change the Location of the Opera Mail Storage Directory

  1. Click or tap the Opera Mail menu button.
  2. Navigate to Help > About Opera Mail to open a new tab.
  3. Find the "Paths" section and then copy the path that's written next to the "Preferences" line. It should point to an INI file, most likely operaprefs.ini if you're using an updated version of Opera Mail.
    1. Note: Also take note of the "Mail directory" folder. You might need it again below.
  4. Now open that INI file in a text editor. You can get there in Windows by pasting the path you copied into the Run dialog box (use Windows Key + R to get there).
  5. In the INI file, find the section titled [Mail}, and then just below it, type the following (the bold text):
    1. [Mail]
    2. Mail Root Directory=
    3. After "=", type the path where you want the mail directory to be. It can be anywhere you want, like an external hard drive, another folder on your primary hard drive, a network location, etc.
    4. Here's an example where we've changed the Opera Mail email directory to be the root of the C drive, in a folder called "OperaMail":
    5. [Mail]
    6. Mail Root Directory=C:\OperaMail\
    7. Mail Database Consistency Check Time=1514386009
    8. Note: If there's already another entry under the [Mail] section, go ahead and put this new entry above it so that it's positioned just below the [Mail] text like you see above.
  6. Save the file and then exit the INI document.
  7. If Opera Mail was open this whole time, shut it down and then reopen the program.

How to Move Your Old Mail to This New Location

If you were using Opera Mail before you changed the mail directory location, then you probably want to keep using that same account with all of those emails. The easiest way to do that is to copy the data from the original folder, and then paste it into this new folder you created above.

Here's how to do that:

  1. Close out of Opera Mail if it's open.
  2. Go to the default folder that you changed above. It's probably C:\Users\[username]\AppData\Local\Opera Mail\Opera Mail\mail, but use the "Mail directory" path you copied during Step 3 to be sure.
  3. In the "mail" folder, select every single folder and file that you see there. Do a Ctrl+A keyboard shortcut to make sure you get it all. There should be a folder called imap, indexer, and store, and various files like an accounts, index, and omailbase file.
  4. Now copy all of it with Ctrl+C. Another way is to right-click or tap-and-hold on the selection and then choose the copy option from the menu.
  5. Open the folder that you chose in the section above - like C:\OperaMail\ in our example.
    1. Note: The folder should be empty, but it won't be if you set up an account after you changed the mail directory above. If you've done this, consider whether you need those email files or if you can overwrite them.
  6. Paste everything you copied a few steps back. Do this with the Ctrl+V hotkey or by right-clicking or tapping-and-holding, and then choosing the paste option.
  7. Reopen Opera Mail. Everything should look exactly the same as before, only now your email data is being stored at a new location.


  • If the location for the mail directory is on the network, like on a shared computer, you need to use two backslashes like this to designate that the location isn't local: \\remotecomputer\OperaMail
  • Older versions of Opera Mail might use a preferences INI file called opera[version number].ini, such as opera6.ini. It's the same file described above, just with a different name.
  • Some versions of Opera Mail already have the "Mail Root Directory" parameter in the INI file. If that's the case for you, just delete the path that's already there (if there is one) and type in the one you want to use.