IT Administrators may want to redirect users' My Documents folders to Box Sync. This type of configuration would allow an organization's users to use their My Documents folder as they're accustomed to, while providing added benefits of having those files backed up to the user's Box account. This is also convenient for certain applications that default to save documents to My Documents.
This guide will walk through two ways an administrator can create an end user-initiated utility to assist in this type of folder redirection.
Method 1: Utilizing Microsoft APIs
Method 2: Utilizing Changes to End Users' Registries
Use of Microsoft APIs allows for a more streamlined solution and does not require end users to restart their machines for the changes to take effect. The information referenced within this section can be written in any language that can access COM APIs (e.g., C, C++, C#, Python, Perl).
The following flags are recommended for use:
||This copies the existing contents (both the files and subfolders) of the known folder to the redirected folder location.
||This deletes the contents of the source folder after they have been copied to the redirected folder.
||This unpins the source folder.
This pins the target folder.
Example Code (written in C)
// Create the KnownFolderManager object
IKnownFolderManager *folderManager = 0;
CoCreateInstance(CLSID_KnownFolderManager, NULL, CLSCTX_ALL,
IID_IKnownFolderManager, (void **)&folderManager);
// Perform the redirection
KF_REDIRECT_UNPIN | KF_REDIRECT_PIN,
boxSyncDocumentsPath, 0, NULL, &error);
Use of registry changes is a secondary approach that can be used by administrators to redirect the user's Desktop. Documents, Favorites, Pictures, Music, Video, etc. folders to point to folders inside the Box Sync folder. Please note that this option requires a restart to the users' machines before the change takes effect, and that any movement of files may cause document paths to change. As a result, users may experience unintended impacts (e.g., accessing an old file through "Recent Files" may fail).
With this redirection in place, applications will, by default, offer to save files in these folders, and saved documents will automatically be uploaded to Box.
Configuration changes should be made by going to the registry at:
To migrate all content within a user's default My Documents folder, the following folders will need to be created within the user's Box Sync folder:
- Box Sync\FileSync\Desktop
- Box Sync\FileSync\Documents
- Box Sync\FileSync\Favorites
- Box Sync\FileSync\Pictures
- Box Sync\FileSync\Music
- Box Sync\FileSync\Video
Below are the configuration changes that should be made:
Registry Value (Example)
Old Value (Example)
New Value (Example)
Note: On Windows 10, it is a known issue that the 'Quick Access' links do not work in this configuration.
The configurations identified in this document are not officially supported by Box and any configuration changes performed by users or organizations are at your own risk. As these configurations reference changes made to individual machines, Box User Services is not able to provide support and assistance in trouble shooting any issues encountered.