Work with network files even when you're not connected

In "Offline Files" (December 1999), I discussed Windows 2000's (Win2K's) offline files, which is a network caching feature. This month, I explain this feature in more detail.

The premise behind offline files is that computers can access their local hard disks more quickly than they can access files on a network server. Offline files creates a hidden folder named \winnt\csc on the system drive and keeps copies of files that you've accessed from the network in that directory. When you tell your system to access a file on a server, offline files first looks in the local directory to see whether you've accessed that file before; if so, offline files asks the server for the time, date, and size of the file. If those three values match the time, date, and size of the locally cached copy, offline files delivers the file from the local cache directory to you to save network bandwidth. When the network is down or not responding and you want to retrieve a file from the network, offline files lets you keep working because you can still access files in the cache. You're not aware that the file came from the cache because it appears to have come from the network. My Network Places (which is Network Neighborhood in Windows NT) still shows you servers and shares that it's aware of, but the only files My Network Places can deliver are files that you've previously accessed and that are therefore in the cache. If you want to save a file to a server that is down, offline files saves the file in its cache on the local hard disk and copies the file from its local cache to the intended server location when the server comes back online.

As I discussed last month, pinning a file (i.e., right-clicking the file and selecting Make Available Offline) forces the offline files feature to cache the file. In addition, you can specify a portion of disk space for offline files to cache files on its own. So, how do you find out which files are currently cached?

Win2K provides a user interface (UI) that helps you determine which files are cached. This UI lets you view the names of cached files. To access this interface, open My Computer, click the Tools menu, select Folder Options, and click the Offline Files tab in the property page that opens. On the Offline Files tab, which Screen 1, page 164, shows, you have two options for viewing which files are cached. One method is to select the Place shortcut to Offline Files folder on the desktop check box. Selecting this option places an icon on your desktop that you can open to see the list of cached files (as well as information such as the time and date of the file and whether it was pinned or cached automatically—pinned files are designated always available offline, whereas automatically cached files are designated temporarily available offline). The other way to see which files are cached is to click View Files on the Offline Files tab.

The Offline Files tab also controls several other functions. The tab lets you tell the system how much space to set aside for the files that it caches automatically. In addition, you can turn off the offline files function from the tab. Finally, the tab lets you control how offline files synchronizes files between the offline files folder and your network servers.

To understand how the offline files cache system works and the importance of synchronization, consider the following scenario. Suppose you open a file from a server. You work on the file and save and close it. The system writes that file twice—once to the server the file originally came from and once in the offline files folder. This process occurs immediately because offline files' caching functionality doesn't have delayed-write behavior, as NTFS's caching does. When you write a file to a server, the system always writes the file at that moment (except when you're not connected).

Suppose you return to the file 3 days later and open it from Microsoft Word. The network redirector software looks at the time, date, and file size of the copy in the local cache and compares these values with the time, date, and file size of the copy on the server. If the values match, the redirector gives Word the local copy. If the time, date, and file size don't match (e.g., someone else modified the file in the past 3 days), the redirector gets the latest version of the file from the server.

Although this process for obtaining files works, it could be better. After all, the idea behind caching is to offer better apparent network throughput. If the latest version of a file were already in the cache, you'd see that the local hard disk can offer a snappier response time than the network provides. For offline files to work best, you need to prestuff the cache with the latest versions of cached files. Synchronization accomplishes this task. Win2K offers several options for keeping the cache's contents fresh.

From My Computer, select Tools, Synchronize, and click Setup to see several synchronization options. The first option is logon/logoff, which configures file synchronization to occur at logon or logoff. I don't recommend this option because synchronizing files at logon or logoff extends the already-lengthy logon and logoff processes; you must wait while data transfers from the servers to your local cache, which is annoying. A better option is On Idle. This option tells your computer to synchronize files when you haven't touched the keyboard or mouse for a period of time that you specify. The third option is to configure synchronization to occur at preset times of the day.

Laptop users' synchronization needs differ from PC users' needs. Before you leave for a trip with your laptop in hand, you must be certain that the network files you need are in your cache (which you can do by pinning the files) and that you have the latest versions of the files (which you can do by configuring your laptop to synchronize when you log off). However, even if you ensure that you have up-to-date files when you leave, someone else might modify the same files on the network while you're away. When you return and try to put your modified files on the network (which occurs at the first synchronization), Win2K will notice the discrepancy. Rather than overwriting the file on the network with your file (and thus destroying someone's work), Win2K opens a dialog box that tells you about the conflict and lets you launch the application to examine your version of the file and the other person's version of the file. Then, you can overwrite the other person's version, discard your version, or save both versions under different names.

Although offline files is a great feature, I ran into one oddity that you might want to watch for. I sometimes create a new file by opening a network folder and right-clicking it to bring up the network folder's context menu. I then choose New and select a document type, which should create a blank document. In Win2K, this process sometimes doesn't work. The OS doesn't generate an error message; it just ignores me. However, the context menu's New option works if I turn off the offline files feature. This problem might occur only in the beta, but keep your eyes open for it.

End of Article




You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

The article overall is great, but it leaves out the fact that some file types are not available for offline use. This differs from the Beta, in that it did not have this restriciton. Q252509 mentions the types, but does not really explain why they are not available. I can understand why they choose MDB and other types not to be available, but at the same time their solution for modifing the extensions is somewhat impossible to follow on a stand alone W2K Pro install. It mentions modifing the appropriate Group Policy Object. I have yet to figure out how to perform this on a W2K Pro install wo/ Active Directory.

John Daily

You say when a document is in the cache and it has not changed on the server, the document is opened locally. Have you checked if this really works this way? According to MS KB article: Q231466, the document is opened from the server anyway, unless you are working in offline mode (which you can't really force except by unplugging the network connection).

Maurice Griep

If you want to control what files are/are not synced as offlines files on a Win2K pro connected to a non AD server:

Open the Group Policy snap in (I can never find it, so I search for *.msc and open "gpedit" in search window)

Under the branch "Administrative Templates" (not sure of the English file name - I'm running a Swedish system), click on "Network" and "Offline files"

The Policy you want is "Not cached files" (again - I'm not sure of the English name...)

To sync all files: just activate the Policy, leave the box for extensions blank.

When I do this it syncs all files including .mdb and .dbf

Andreas Wennborg

Great article. Wondering if there is way to map the offline folder to one in say My Documents directory instead of the default \winnt\csc ?

Pradeep Sagam

What happens if the server that you are storing the documents on, changes names? Is there a way to easily point the offline files to the new server name?

Joe

Excellent article! I'm running Win 2k SP4. I was not aware that my system was set to make a 120GB NAS filled with GIS data available offline. Of course, over time, Syncronize was filling my hard drive, and I was getting out of disk space errors. I'm the only user on this workstation, and have no idea how Syncronize was enabled.

Can a user delete the cached files manualy without causing problems?

Clint

How can I enforce the files not cached to all members of my SBS 2003 domain?

maxcoppin

Article Rating 3 out of 5

i cannot find this article :

---------------------

You say when a document is in the cache and it has not changed on the server, the document is opened locally. Have you checked if this really works this way? According to MS KB article: Q231466, the document is opened from the server anyway, unless you are working in offline mode (which you can't really force except by unplugging the network connection).

Maurice Griep -November 23, 2000 --------------------------

what is the true ?

adrianotta

Article Rating 5 out of 5

Anyone having a problem when they set up the "My Do***ents" folder for offline use, then just on a whim, it defaults back to the old path and offline files aren't there anymore?

Anonymous User

Our laptop users have a J: drive on a win2003 server with My documents redirected to point to the J: and the whole of J: being made avaiable offline. Sometimes when the laptops are away from the network My Docs reverts back to the original path and any attempt to access the J: drive give \\server\path is not available. (like the previous posting) Anyone have any ideas?

Anonymous User

I have group policies configured to sychronize offline files, but would like to schedule sychronization to minimize some of the network "hit" at 8:00 and 5:00. I find no information indicating that this is configurable via a GP. Has anyone had experience doing this? Thanks.

Anonymous User

Article Rating 4 out of 5

I have a question. I notice that when I synchronize, all of the files are taken out of their prospective folders and displayed as just files. How do I syncronize and keep my existing folder structure with each file in its original folder?

Anonymous User

Article Rating 4 out of 5

here's a blog on offline files.

http://offlinefiles.blogspot.com/

inspiron

Article Rating 3 out of 5

 
 

ADS BY GOOGLE