With the use of Registry Editor, one can change default location of OST file irrespective the versions of Outlook. For the same, follow the steps mentioned below:
Another site with moving outlook OST file but I didn't want to go the symbolic link method.
Creating Symbolic Links
To create a Symbolic Link, you can use the MKLINK Command line tool or the New-Item PowerShell (version 5 or later) cmdlet. Whichever method you pick, the result is the same.
In the example below, we assume that the name of the ost-file is outlookcom.ost
and that we move it from its original location to a location called D:\Documents\Outlook Files
- Close Outlook.
- Move the ost-file or pst-file from its original location to its new location.
The default location is; C:\Users\%username%\AppData\Local\Microsoft\Outlook
- Open an elevated Command or PowerShell window.
A quick way to do this is;
- Open the Start Menu and immediately type one of the following;
- Command Prompt
- PowerShell
- Right click on the result and choose; Run as administrator
- Provide administrator credentials for your computer or press "Yes” to accept the User Account Control prompt.
- Type one of the following commands (of course with your own file names and locations) depending on whether you are using the Command Prompt or PowerShell;
- Command Prompt
mklink "C:\Users\%username%\AppData\Local\Microsoft\Outlook\outlookcom.ost" "D:\Documents\Outlook Files\outlookcom.ost"
- PowerShell
New-Item -ItemType SymbolicLink -Path "C:\Users\%username%\AppData\Local\Microsoft\Outlook\outlookcom.ost" -Value "D:\Documents\Outlook Files\outlookcom.ost"
Tip!
You can actually leave the variable %username%
in your command. Upon executing, the command it will automatically resolve it to your actual username.
Once you’ve created the symbolic link, the file icon will look like a shortcut in Explorer. However, instead of having the Shortcut file type, it still holds the ost-extension and the "Outlook Data File” file type (Windows 7) or the ".symlink” file type (Windows 10).
Its file size will report as 0KB but the file it is pointing to of course still holds its size; The link to that file simply doesn’t take up any disk space.
Comparison between the properties and look of a Symbolic Link,
Shortcut and the original file (which is marked with 2 in the name).
Undoing the changes
When you want to undo the changes, simply close Outlook, delete the Symbolic Link file like and other file and then move the ost-file back to its original location.
Creating Symbolic Links via a GUI based tool
Aside from the command line tools provided by Microsoft, you can also use a free 3rd party tool to create Symbolic Links via a user interface (GUI).
- Link Shell Extension
This tool works for all Windows versions and supports the creation of a Symbolic Link, Junction, Volume Mountpoint, Smart Copy, DeLorean Copy, Hardlink Clone and Symbolic Link Clone via a GUI.