In my previous column, I wrote about the Offline Files feature which makes it easier to manage and synchronise data stored on computers that are not always connected to a network (such as notebooks) (see here for the article).
As I was working with setting up Offline Files and redirecting special folders, I discovered that there is a drawback: Microsoft designed them so that they work on a per-computer basis, and not a per-user one. This means that synchronisation takes place no matter who is logged in, which can be annoying for the other users.
Moving the special (or shell) folder that most users store data in, My Documents, is the easiest: just right-click on My Documents, select Properties, and click on the Target tab. In the middle, you’ll find the Target Folder Location box which lets you specify the new home for My Documents — such as a network share, for instance. You can also browse for the target folder, or simply click on the Move button to shift My Documents, including content, in one fell swoop.
If you manually specify the path, you must use the Universal Naming Convention (UNC) format, i.e., \\server\path-to-folder. Don’t use an absolute path like C:\path-to-directory because this may not be available over the network. Also, take care that the UNC path is no more than 260 characters long. Any longer than that and the path will be truncated to 260 characters, which will cause Folder Redirection to fail. Note that moving My Documents may fail if you have files open that have been saved to that folder. Close down the word processor, or other application accessing My Documents, before moving the folder.
The My Documents folder you see in My Computer and/or your Desktop is actually a shortcut to the shell folder storing the documents. This is an important distinction: even though you have ‘moved’ the folder, you will still have a My Documents folder in the %WINDIR%\Documents and Settings\%USERNAME% directory. Some programs may have this path hard-coded into them, so be aware that documents could still end up in there rather than on the network share as expected.
To make the moved folder on the net-work share available offline, right-click on My Documents, and select the eponymous option. If you have set up the Synchronisation Manager as explained in the earlier article, files in My Documents and its subfolders will now be automatically backed up on the network share each time you log on (or off).
Redirecting the special or shell folders can be handy, but other ones than My Documents are a bit tricky to shift, as you can’t simply open up the Properties page and point them to a new location. You could change the location at this Registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ex-plorer\Shell Folders, which shows the current location of all the special folders on your computer (FIGURE 1). Before making any changes to the Registry, back up the key with this command in a CMD box: reg export “HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders” MyShellFolders.reg
This creates a .reg file on which you can double-click in order to restore the Registry key. Store the backed-up file in a safe place.
You could edit this Registry key to provide different paths for redirecting the My Documents subfolders, like My Pictures and My Videos, for instance. Microsoft recommends that you keep them underneath My Documents, however.
Alternatively, if you have Active Directory set up on your network, make the changes there. Confusingly, the Windows XP Professional Help says you can use the Group Policy editor to redirect folders, but unfortunately this does not work for the Local Computer object.
Microsoft also provides the TweakUI utility (www.microsoft.com/windowsxp/pro/downloads/powertoys.asp) which lets you move the special folders easily, and without worrying about playing with the Registry.
Note that, unlike with My Documents, you have to manually move files in other special/shell folders to the new location.
The main gotchas you are likely to encounter with Offline Files and Folder Redirection involve applications in those directories — some cannot handle being accessed in this manner, and may not find all the necessary libraries and settings files.
Another issue worth bearing in mind is that the above tip works best on a Windows network running on a LAN. It is not really suitable for a TCP/IP connection over the Internet, unless you employ a few tweaks and safety measures at least.