• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Moving an Exchange Offline Data File (*.ost)

Slipstick Systems

› Exchange Server › Moving an Exchange Offline Data File (*.ost)

Last reviewed on June 17, 2019     105 Comments

While it's usually not necessary to relocate the offline cache (*.ost) 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 or a smaller SSD.

Outlook 2013 and newer IMAP 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 can 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 one of the following methods.

  • Set the ForceOSTPath registry key. This is the recommended method but you need to set the key before creating the account in your profile.
  • Use Symbolic links or Junction points in Windows to redirect the folder to a new location.
  • Set the OST file location while adding the account to your profile.
  • Trick Outlook into letting you choose the ost file by using a renamed PDF file.

 

Using ForceOSTPath to set the file location

The easiest way to change where Outlook says the OST files is setting the ForceOST registry key, however you need to do this before you add the account to your profile, or remove the account and add it back after setting the key. Administrators can set the key using GPO or a log on script.

The ForceOSTPath key is supported in current versions of Outlook. In Outlook 2010 and up, it will apply to new accounts in a profile, while in Outlook 2003 and 2007, it applies only to new profiles.

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

To set the registry key:

  1. Open the registry editor (Press Windows key + R to open the Run command.
  2. Type regedit in the Open field and press Enter.)
  3. Browse to the Outlook key for your version (listed below).
  4. Create a string value named ForceOSTPath
  5. Right click on ForceOSTPath value and choose Modify
  6. Paste the path into the field and press Enter. (You can use variables if you are using group policy to push it out to your users.)

Outlook 2016

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

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

 

Symbolic Links or Junction Points

You can use Symbolic Links or Junction Points to repoint the file or folder where the .ost is stored. You can use this method to move the folder to the new location or just the data file.

To create a Symbolic Link, you'll use the MKLINK Command line.

  1. Close Outlook.
  2. Move the ost-file or pst-file from its original location to its new location.
    The default location is %locaappdata%\Microsoft\Outlook
  3. Open a Command window using Run as Administrator. Type cmd on the Start menu, right-click on Command Prompt or cmd.exe and choose Run as administrator. you'll need to enter the administrator password or Yes to allow the prompt.
  4. Use the mklink command in this format: mklink "C:\old-path" "D:\New path". If you are moving just the data file, you'll need to include the data filename.  Quotes are required if the path contains spaces.

For example:
mklink %localappdata%\Microsoft\Outlook\diane@contrarytech.com.ost "D:\Outlook Data Files\diane@contrarytech.com.ost"

When you use a symbolic link to move a file, a shortcut is created in the default folder location. If you want to revert back to the original location, delete the shortcut to break the link.

If you prefer to use PowerShell to create the symbolic links, use the New-Item cmdlet. You'll need to use quotes if the path contains spaces. If you don't want to use the exact path, call the environment variable like this: $env:localappdata
You will need to move or rename the original file before running the powershell.

New-Item -Path $env:localappdata\microsoft\outlook\diane@contrarytech.com.ost -ItemType SymbolicLink -Value "D:\Outlook Data Files\diane@contrarytech.com.ost"

Create a Symbolic link for a folder
To create symbolic links to a folder, you need to move, delete, or rename the folder you are creating the symlink for. In this example, it's the Outlook folder. If the folder exists, the powershell will error.

New-Item -Path $env:localappdata\microsoft\outlook\ -ItemType SymbolicLink -Value "D:\Outlook Data Files\"

 

Move the OST and recreate the account

If you have an existing ost file, you can move the .ost file, remove and recreate the account in the profile using 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 File, Account Settings or open the profile in Control panel, Mail.
  3. Remove the account from your profile.
  4. Click New
  5. Enter your username and password and let Outlook find your account information
  6. Select the Change account settings option, and then click Next
    Change Account Settings
  7. Click More Settings (1)
  8. On the Advanced tab, click Outlook Data File Settings. (2)
  9. Click Browse (3), browse to the .ost file that you copied in step 1, and then click Open.
  10. 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.
  11. OK your way back to Outlook then restart Outlook.

move ost in Outlook 2013

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:
%localappdata%\Microsoft\Outlook

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.

  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 cached Exchange ost file in Outlook 2010 and older
 

Not Recommended PDF Method

This method is not recommended as it can break your address book. You'll need to let Outlook create new ost files and re-sync your mailbox.

  1. Close Outlook.
  2. Open Windows Explorer and type or paste %localappdata%\microsoft\outlook in the address bar then press Enter.
  3. Copy a PDF file into the folder.
  4. Copy the ost name, then rename the ost file by adding -old to the end of the name. (This is easier if you have Show Extensions enabled.)
  5. Rename the PDF file using the old ost file. You need to change the extension to ost.
  6. Open Outlook.
  7. Outlook will complain that it can't use the ost.
    Error message that ost is wrong
  8. Browse to the new location.
    Create a new ost in the new location

More Information

The steps to move IMAP, POP, Sharepoint or Internet calendar pst files are similar. 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.

Moving an Exchange Offline Data File (*.ost) was last modified: June 17th, 2019 by Diane Poremsky

Related Posts:

  • Moving Outlook .pst files to a new computer
  • open file location from settings
    Where is Outlook's PST file?
  • How to move IMAP data files
  • Add a New Data File (*.pst) to Your Profile

About 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.

Subscribe
Notify of
105 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

a a
September 2, 2023 4:24 pm

Outlook ignored the relocated+symlinked data files; it recreated and repopulated the data files in original (default) location, which is where the symlinks are.

0
0
Reply
Diane Poremsky
Author
Reply to  a a
September 7, 2023 10:37 am

Something isn't right... I'll test it again. Try junction points and move the folder.

0
0
Reply
a a
September 2, 2023 4:20 pm

Did the symlink method work for anybody?

0
0
Reply
Diane Poremsky
Author
Reply to  a a
September 7, 2023 10:31 am

I've used both (symlink and junction points) in the past and both worked for me. Which OS are you on?

0
0
Reply
nolgaviria
June 20, 2023 9:21 am

Thnaks a lot for share

0
0
Reply
Waleed
June 12, 2023 12:31 pm

Wow.. The last trick did it all!
Thanks for sharing!

0
0
Reply
Jose
April 7, 2023 8:22 am

Thank you DIane!

0
0
Reply
Łukasz
March 8, 2023 5:25 pm

That part about Symbolic Links helped me with problem of moving IMAP .ost file from C: to other drive - THANK YOU VERY MUCH! It was realy usefull! :)

2
0
Reply
Pawel
August 10, 2019 3:46 pm

Explained perfectly. Thx, thx, thx, ... * 100

1
0
Reply
Rick
August 24, 2018 5:15 pm

Re Method #3, it should be noted that it won't let you remove an account if your only Data File entry is the OST. You'll need to add a dummy data file, perhaps the sample PST, first.

However, when you do that and you later try to remove that data location from the profile (even when done via Control Panel), you'll get "You cannot delete this outlook data file. Configuration information in the file is being copied. You can delete the file after this information is being copied."

And I don't think it ever is. So maybe it's best to create a new profile if going this route, all the more reason not to go this route and instead use the Registry.

0
0
Reply
Diane Poremsky
Author
Reply to  Rick
August 24, 2018 11:11 pm

Yeah... that is a problem any time you need to remove the last account and dont want to make a new profile.

After adding the pst, restart outlook, wait a minute or so then close it. You should be able to delete the pst now....

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 31

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Jetpack plugin with Stats module needs to be enabled.
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment