The following flags are recommended for use:
|KF_REDIRECT_COPY_CONTENTS||This copies the existing contents (both the files and subfolders) of the known folder to the redirected folder location.|
|KF_REDIRECT_DEL_SOURCE_CONTENTS||This deletes the contents of the source folder after they have been copied to the redirected folder.|
|KF_REDIRECT_UNPIN||This unpins the source folder.|
This pins the target folder.
// 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);
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.