Moving an Outlook offline data file (*.ost)

Last reviewed on May 27, 2014   —  45 comments

While it's usually not necessary to relocate the offline cache used by an Exchange account, it is possible to move it to another folder or partition. For the most part, it only makes sense to move it if the C: drive is full.

Outlook 2013 IMAP and EAS (Outlook.com/Hotmail) ost files are moved using the ForcePSTPath key.

Moving the offline cache so its easier to back it up is generally pointless: it's an offline copy of your Exchange mailbox and it can only be opened by the account that created it. If you try to use an old cache file, Outlook will complain that it doesn't match the server mailbox. If the server fails and there is no server backup, the contents of the current, most up-to-date *.ost should be used to repopulate the server. In short, if you want a usable backup of your mailbox, export the contents to a *.pst file instead of including the *.ost in a backup file.

If you need to recover data from an orphaned ost file, I have a list of commercial recovery software listed at Convert an Offline File (.ost) to a Personal File (.pst)

With that disclaimer out of the way, if you do need to relocate the offline file, you can move it using the following steps.

If you are moving an .ost file, you need to create the ForceOSTPath registry value before adding the account to your profile.

Move the *.ost in Outlook 2010 and older

In Outlook 2010 and older, you can move the ost used by cached Exchange to another location by disabling offline mode then changing the path on the Advanced tab of the Exchange account properties.

If you want to move the ost before you create a profile, use the ForceOSTPath registry value.

Move the cached Exchange ost file in Outlook 2010 and older

  1. Open Account Settings
  2. Click More Settings (1)
  3. Deselect Use Cached mode (2) and click Apply.
  4. You can close Outlook and move the ost file now. If you want to create a new .ost file, you can skip this step.
  5. Click Outlook Data File button (3)
  6. Disable offline use (4) if Browse button is not enabled
  7. Click Browse button to select moved ost file (5)

Move the *.ost in Outlook 2013

The above method does not work with Outlook 2013. When you try to change the location of the offline file (.ost) in Outlook 2013, the Browse button is disabled.

You need to use one of two methods to move the ost file and both involve a new profile. If you are making a new profile, you can use ForceOSTPath registry key. Or you can move the .ost file and create a new profile in the Control panel, Mail applet and point it to the new location.

  1. Copy your .ost file to the new location. You can skip this step if you want to create a new .ost file.
  2. Open the Control panel, find Mail
  3. Click Show Profiles
  4. Click Add
  5. Control panel, mail dialog

  6. Type a name for your new profile, click OK
  7. Enter your username and password and let Outlook find your account information
  8. Select the Change account settings option, and then click Next
  9. Change Account Settings

  10. Click More Settings (1)
  11. move ost in Outlook 2013

  12. On the Advanced tab, click Outlook Data File Settings. (2)
  13. Click Browse (3), browse to the .ost file that you copied in step 1, and then click Open.
  14. If you want to create a new .ost file, browse to the new location, enter a filename, and then click Open. Outlook will create the new .ost file.
  15. OK your way back to the Mail profile dialog
  16. Click Always use this profile (shown in second screenshot), select the new profile that you created, and then click OK to close the dialog

Tip: You can jump to the ost location in Windows XP, Vista, or Windows 7/8 by typing or pasting this command into the address bar of Windows Explorer and pressing Enter:
%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook

 

Using ForceOSTPath to set the file location

The ForceOSTPath key is supported by Outlook 2003 and up, but applies only to new profiles (or in the case of Outlook 2010 and 2013, to new accounts in a profile).

You need to set this key before you add the account to your profile.

Open the registry editor and browse to this key (create it if it doesn't exist). Create a string value named ForceOSTPath and add the path. (You can use variables if you are using group policy to push it out to your users.)

Outlook 2013

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook
Expandable String Value: ForceOSTPath
Value data: full path you want to use

Outlook 2010

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook
Expandable String Value: ForceOSTPath
Value data: full path you want to use

Outlook 2007

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook
Expandable String Value: ForceOSTPath
Value data: full path you want to use

Outlook 2003

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook
Expandable String Value: ForceOSTPath
Value data: full path you want to use

Common variables

VariableTypical value (May vary)
%APPDATA%C:\Users\{username}\AppData\Roaming
%LOCALAPPDATA%C:\Users\{username}\AppData\Local (default for OST files)
%USERPROFILE%C:\users\{username}
%WINDIR%C:\Windows

More Information

The steps to move IMAP, POP, Sharepoint or Internet calendar pst files are similar, but cache files used by the Outlook Connector can't be moved. Outlook 2007, 2010, and 2013 support the ForcePSTPath registry value, which changes the default *.pst path for POP3, IMAP, and SharePoint data files. See How to move the IMAP personal folder (*.pst) for more information.

Written by

Diane Poremsky
A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Please post long or more complicated questions at Outlookforums.

45 responses to “Moving an Outlook offline data file (*.ost)”

  1. Ron

    Oh, you are my hero. I was searching for this for 2 days! I had to relocate the OST file on my tablet to save my internal memory. Strugling with all the articles before Outlook 2013 I finally found this article! Thank you so very much!!

  2. John Brown

    I've tried this multiple times and cannot get the ost file to move to my D: drive. I completely uninstalled Office and wiped the registry settings for it so I could start clean. I added the ForceOSTPath key and then created the account in Outlook. It always uses the default C: location and of course I'm unable to change it.
    When I tried the create a new profile option, the part where you say to select Outlook Data File Settings in the advance tab is not even there, so I'm pretty much stuck. I'm trying to get this ost file off my SSD drive to conserve space to no avail. NOTHING should be this difficult to move a location. I don't understand why they made it harder in 2013, I'm sort of regretting that I upgraded now.

  3. Mohamed Azher

    I have the same problem, i am trying to configure my gmail account with outlook 2013. I tried setting ForceOSTPath but it does not work with new profiles/accounts. Also also the part where you say to select Outlook Data File Settings in the advance tab is not even there for me either.

    No matter what i do the datafile gets created in the c:

  4. JB

    Have you figured out anything with the people who are having trouble with IMAP and not being on Exchange. I have tried the registry change (even the automated one from MS) and it doesn't work and the setting when doing a new profile isn't there since I'm not using exchange.

  5. JB

    I am trying to move the IMAP (OST) file. Do I need to set the forcePSTpath as well? I doesn't look like it is making a PST at all, just the OST in %localappdata%\microsoft\outlook. I have tried setting the forceOSTpath to no avail. If I make a new profile (or a new account, since I have 2013), it does not seem to use this setting.

  6. Lubor

    The move does not work for me either. I have exactly the same problem as described above by Mohamed Azher. I set the ForceOSTPath. I don't see the "advanced tab" either. And the OST file is created in the "old" default location even before I perform "7.Select the Change account settings option, and then click Next".

  7. Scott

    I just installed Office 365 Home Premium on my computer yesterday and I have a Hotmail account that I'm trying to set up with Outlook. I have an SSD drive so I'm trying to move the OST file off of it (as I see others are trying to do). I tried doing it through the Mail applet as shown in the article but that didn't work. I also tried setting the ForceOSTPath in the registry and it didn't work either. Please let me know what else, if anything, I can try.

    Thanks,

    Scott

  8. smichels62

    What are "junction points"? Also, I tried deleting the account before setting the ForceOSTPath then created the account.

    Thanks,

    Scott

  9. smichels62

    Diane,

    It looks like the ForcePSTPath key did it. I appreciate your help.

    Thanks,

    Scott

  10. smichels62

    I just noticed at the top of the page where it says to use the ForcePSTPath key for Hotmail. Don't know how I missed that. I think I got confused since the Hotmail stuff gets stored in an .ost file but the name of the key to use has "PST" in its name. Something's just not quite right with that, IMO.

    Scott

  11. smichels62

    That's nice to know. For a minute there I was thinking maybe I'd gotten more senile or something. I knew I wasn't going insane since I did that a long time ago. Also, I saved the links you posted about Shell folders and Junction Points so I can check them out later. Might be useful, who knows.

    Thanks again,

    Scott

  12. Anon

    None of this crap is accurate for Outlook 2013. Idk where this dumb ***** got her degree, but there's no button in the Advanced tab to change the location. This entire page is worthless.

  13. Vijay Arora

    There is a slight change in Office 2013 with OST redirection in the registry key. Try below, it should definitely work for you.

    Open registry and go to below path>>

    [HKEY_CURRENT_USERSoftwareMicrosoftOffice15.0OutlookOST]

    Create new string value >> ForceOSTPath
    Double click on it and put desired path under "Value Data"

    Create outlook profile and check the location you have given under "Value Data"

    This worked fine for me.

    Vijay

  14. D

    Will this action create a new *.ost file in the new location, which will include everything from the old *.ost file + plus new stuff that will be added, while the old *.ost file will be discontinued (for lack of a better word)? Right

    I want to make sure, that in the new location there will be all the emails from the ost file from the old location

  15. Jim Watson

    Hi Diane,
    I have tried just about every published solution regarding this and I have had no success.
    No issues with the PST file but the OST files refuse to play.
    I'm running Office 2013 on Windows 8.1 PRO X64.
    Here is a link to a snapshot of my Registry settings for Outlook:- https://dl.dropboxusercontent.com/u/33500869/Outlook1.JPG

  16. Jim Watson

    One is an Exchange account (Hotmail), the other is IMAP (Gmail).
    I deleted both accounts, set up the keys, then recreated the accounts.
    Also tried junction points and symbolic links but Outlook apparently ignored those.
    What I find really frustrating is that I have just reinstalled Windows 8.
    In the previous install I had managed to move both PST and OST files without any problem.
    The wonders of Windows. :(

  17. Jim Watson

    Having tried ForcePSTPATH, ForceOSTPATH, symbolic links, directory junctions, etc etc, I have now decided to give up before my head explodes.

  18. Cyn

    Not techie, but followed your directions and when I went to enter the profile it said the path to the data file was invalid. I know it's right because I navigated to it about a million times before I found your article. Hotmail, Outlook 2013, Windows 8.x?

  19. zachiP

    can someone help? i have an existing ost and i want to import pst but to use it as default data file - i know you can do that via account setting (set as defualt). but how can i do that without GUI involved -->. registry or COM object?

  20. Shailendra

    Did not help as I never got the option to change the OST file path under settings. Browse button is disabled by default and taking default user location for OST file.

  21. Keith M

    I found a way to move existing OST files without rebuilding profiles. I just moved over 600 OSTs for my users without a single profile needing to be rebuilt.

    1. Move the OST to the new location
    2. Break the path to the old location. I used a symbolic link command that pointed to a bogus OST destination. You could delete the directory that the old OST used to live in, but that might cause other issues
    3. Start Outlook. It will complain that it didn’t see the OST and will prompt you to browse to it. At that point, you can repoint Outlook to the OST file that is in the new location.

    If you are a network admin, trying to move OSTs to a new location, here is what I did:
    - Created a list of all OST files that needed to be moved. Converted that list into a .bat file that did two things:
    o Move the ost from its current location, to its new location
    o Create a symbolic link in the old location that points to a non-existing location
    Here is an example of what my .bat file looked like:
    move u:\AmandaC\AmandaC.ost o:\AmandaC
    mklink "u:\AmandaC\AmandaC.ost" “put_bogus_path_here\AmandaC.ost"
    - Created a GPO that sets Outlook to use Offline Cache and sets the destination folder (apply to all users ahead of time. It won’t do anything on pre-existing Outlook profiles)
    - Created a GPO that runs a script on login. I used WinBatch to create the script, which does the following:
    o Check to see if the file “ost.txt” exists in the user’s home directory. If so, exit (the script already ran for this user)
    o If ost.txt doesn’t exist, open outlook. Wait for the Data File location error to appear and click the browse button. The default browse location will be what you set in the GPO above.
    o Select the OST in the browse list. OK, OK,…
    o Copy ost.txt to the user’s home directory so the script won’t run again for them
    o Outlook will open using the OST file in the new location, using the same profile, with any PSTs that were attached, etc… Nothing is lost!

Leave a Reply

If the Post Coment button disappears, press your Tab key.