Learn what devils lurk in the details of this useful Win2K feature

The Windows 2000 Offline Files feature caches network files and folders on your PC hard disk so that you can access them when your PC isn't connected to the network. Laptop computer users are the true beneficiaries of Offline Files, and many have taken to the feature pretty quickly. Offline Files isn't difficult to set up, but a few devils do lurk in the details. I bring these potential troublemakers to light as I show you the basics of how to configure and administer Offline Files.

Caching Files
Win2K can make any shared file or folder on a Windows network available offline. The files or folders can reside on any computer that supports Server Message Block (SMB) file and printer sharing, including PCs running Windows Millennium Edition (Windows Me), Windows NT, or Windows 9x. A Win2K file server isn't required. Win2K can't cache files from Novell file servers or Win2K Server Terminal Services systems.

The Offline Files functionality is enabled by default on all Win2K Professional computers. However, you still need to complete one or two steps to cache a copy of a network folder on a computer.

First, you must share the folder on the file server and determine which specific caching properties should apply to the folder and its files. To share a folder, right-click it in Windows Explorer and select Sharing. On the Sharing tab, select the Share this folder option and click Caching. Figure 1 shows the resulting Caching Settings property page. By default, the Allow caching of files in this shared folder option is enabled and Manual Caching for Documents is selected. Manual caching lets a user manually select from the share point the files or folders that he or she would like to have available when working offline.

Alternatively, you could select the Automatic Caching for Documents setting for the folder. With this setting, Win2K caches any file in the folder that a user opens while connected to the share point and makes the cached version available to the user when the user goes offline. For example, if a user opens a Microsoft Excel spreadsheet in the Spread-sheets shared folder, Win2K caches the spreadsheet on the user's PC. If the user then logs off the network, he or she can continue working with the spreadsheet. The next time the user logs on to his or her computer while connected to the network, Win2K will synchronize the network and local versions of the spreadsheet. Win2K will also synchronize the two spreadsheet versions when the user makes changes to one of the versions or logs off of his or her computer while connected to the network.

The Automatic Caching for Programs setting also automatically caches open files. Like Manual Caching for Documents and Automatic Caching for Documents, Automatic Caching for Programs synchronizes network and local versions of a file when a user logs on to and off of his or her computer while connected to the network. However, Automatic Caching for Programs doesn't synchronize versions of executable files when a user makes changes to one of the versions while connected to the network. (The setting does synchronize changes made to nonexecutable files.) Thus, you might want to reserve this setting for read-only files, and you should set read-only permissions on the files in the shared folder.

If you chose the manual caching setting, you have another setup step to perform—you must identify, or pin, the shared folder. In My Network Places, right-click the shared folder and select Make Available Offline. The Offline Files Wizard appears the first time you select this option. The wizard asks whether you want an icon to appear in the system tray to remind you that you're working with an offline file and whether you want an icon to appear on all files that are available offline. Figure 2 shows the My Network Places view of the sales stuff folder with the two-arrow Offline Files icon. The next time you pin a shared file or folder for offline use, the wizard won't appear.

By default, Win2K stores offline files on the local hard disk in the \%systemroot%\csc folder. (The csc stands for client-side caching.) Also by default, Win2K doesn't cache files with the extensions .slm, .mdb, .ldb, .mdw, .pst, and .db. The group policy Computer Policy\Computer Configuration\Administrative Templates\Network\Offline Files\Files not cached lists the file types not cached. Win2K won't cache any files that have the extensions that you add to this policy, but it will cache all other file types. For example, if *.mdb is the only entry in the policy, Win2K won't cache files of this type but will cache all other file types. Be careful when changing this policy. For example, you probably don't want to allow caching of Microsoft Access .mdb files, because many people might update these files at the same time, or Microsoft Outlook .pst files, because they can be very large.

Synchronizing Files
After you've made files and folders available offline, Win2K needs to synchronize the cache versions and the network versions of the files and folders on an ongoing basis. Figure 3 shows the Synchronization Settings dialog box you can use to control some synchronization options. To open this box, select Synchronize from the Windows Explorer Tools menu. In the resulting Items to Synchronize dialog box, click Setup.

By default, Win2K synchronizes files when a user logs on and off his or her PC while attached to the network. Other options include synchronizing during an idle period, at a scheduled time, or on demand. A salesperson who travels frequently might not want to synchronize large files over a slow dial-up connection to the corporate network. The Synchronization Settings' Logon/Logoff tab lets you specify which files and folders to synchronize over which type of network connection.

Synchronization occurs in the background when a PC is connected to the network and a user accesses the cached version of a file. Win2K quickly compares the cached file with the network version. If the network file's date, time, and size haven't changed since Win2K last copied the file to the local cache, Win2K opens the local copy; however, if the network version has changed and the local copy hasn't, Win2K opens the network version instead.

If Win2K discovers during synchronization that both the network version and the local cache version of a file have changed since the last synchronization, it displays the Resolve File Conflicts warning that Figure 4, page 72, shows. You can decide to keep both versions (renaming the cache version and storing it on the network), replace the network version with the local version, or replace the local version with the network version. Unfortunately, Win2K doesn't let you choose to merge the two changed files. However, you can click View next to each file to open the files and look at their changes. You can copy and paste between the versions at this point as well.

Deleting Cached Files
If someone deletes the network version of one of your cached files while you're offline, the next time you're online and Win2K synchronizes your PC with the network, a dialog box similar to the one in Figure 4 will ask whether you want to replace the network version with your local version or delete your local version. However, if you aren't careful about how you delete a cached file while offline, Win2K will automatically delete the network version of the file without any warning during the next synchronization process.

To delete cached files when you're offline in such a way that Win2K won't automatically delete them from the network, start Windows Explorer, click Tools, and select Folder Options. On the Offline Files tab, which Figure 5 shows, click Delete Files. In the resulting window, you can individually delete cached folders and any files that you made available offline. To delete a single file from a cached folder, click View Files. The resulting Offline Files Folder displays all the files that you've made available offline from all locations. Right-click the file you want to delete, and select Delete.

To delete the entire contents of a cache, you can use the procedures just described to delete all the folders and files, or you can reinitialize the cache. To reinitialize, press Ctrl+Shift while clicking Delete Files on the Offline Files tab. A dialog box will ask you to confirm the cache reinitialization. After you click Yes, you can't change your mind; this feature has no "undo." Also, you must restart your PC.

Cache Tricks and Traps
Folders and files that you make available offline through one of the automatic caching options rather than the manual option are available offline only on a temporary basis because Win2K allows only limited space for storing them. As the temporary Offline File cache fills, Win2K removes older temporary offline files to make room for new temporary offline files according to a first in/first out (FIFO) strategy.

By default, Win2K sets aside 10 percent of the free disk space in the partition containing the \%systemroot%\csc folder for temporary offline files. You can use the slider on the Offline Files tab to adjust the amount of disk space available. The slider regulates only the amount of disk space available for temporary files. The portion of the \%systemroot%\csc folder that holds files and folders that you've manually made available offline has access to any free disk space in the partition that contains \%systemroot%\csc (i.e., it isn't limited by the 10 percent set aside for temporary offline files).

Depending on how large your \%system-root% partition is and how many manual offline files you have, your \csc folder might begin to crowd Win2K. Fortunately, you can use the cachemov.exe tool in the Microsoft Windows 2000 Server Resource Kit or Microsoft Windows 2000 Professional Resource Kit to easily move the cache to any local partition. To start the GUI tool, make sure you're logged on as an administrator and double-click the tool in Windows Explorer. Then, simply select an available partition. You can move the cache to any local NTFS, FAT, or FAT32 drive or partition. You can't move it to a network drive or to removable media.

You can't encrypt the Win2K \csc folder, so cached copies of encrypted network files and folders aren't encrypted, even if the Encrypted option in the offline file or folder's properties is selected. However, Win2K preserves NTFS and share permissions in an Offline Files cache, so if John and Nancy use the same laptop and only John has NTFS permissions to a file, Nancy can't open the cached file.

Win2K's Offline Files feature is a boon that truly makes a laptop user's life a little easier. This feature also provides desktop users fast access to network files and access to network files when the network file server is temporarily offline. And if you bear in mind the few gotchas that I've pointed out, Offline Files is a breeze to set up and administer. For more information about Offline Files, see "Related Articles in Previous Issues."

Related Articles in Previous Issues
You can obtain the following articles from Windows 2000 Magazine's Web site at http://www.win2000mag.com.

DAVID CHERNICOFF
"Mobile Computing with Windows 2000 Professional," Summer 2000, InstantDoc ID 8816
SEAN DAILY
Watch Your RAS, "Win2K Pro on the Road, Part 2," July 2000, InstantDoc ID 8961
Watch Your RAS, "Windows 2000 Professional on the Road, Part 1," June 2000, InstantDoc ID 8747
MARK MINASI
Inside Out, "More About Offline Files," January 2000, InstantDoc ID 7789
Inside Out, "Offline Files," December 1999, InstantDoc ID 7609