Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


May 2001

The Ins and Outs of Offline Files


RSS
Subscribe to Windows IT Pro | See More Windows 2000 Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

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

End of Article



Reader Comments
I had been enjoying off-line files on my laptop for some time, but now I can't get off-line files to work.
My system initially had NT and I dual-booted and life was good. I began to run out of space on my win2k partition so I ended up backuping and restoreing to a newly created c partition. My problem seems to be that I deleted the CSC folder during the process; I don't know why, and now everything is working fine, except off-line files. I tried the cachemov.exe and it errors out on "copying offline files cache" Got any ideas?

Kevin Martin August 15, 2001


I can´t find any information regarding to the state "local copy date/time has been modified", which causes the synchronization to stop happening for the files in this state.

I´m facing this situation with some Excel files that I made available offline, but are changed by other people when I´m disconnected.

The only way I could find to restore the offline version was to clear the "make available offline" status, and then set it again, but this is not pratical.

Do you have any sugestions on that?

Thank you.

Ricardo De Paola August 16, 2001


For clarification: when using automatic caching, you should be aware that simply browsing a folder in explorer considers that opening a file, unless you have turned off last access update at:[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsDisableLastAccessUpdate"=dword:00000001

Also, if the server that you have offline files on goes away, cleaning out the synchronization manager is a nightmare. Getting to your actual files can be cumbersome at best in this situation.

Doug Delaney April 22, 2002


Excellent article. But I didn't see anything regarding using offline files to sync user's home directories that reside within a DFS enabled path.

Matt April 23, 2002


Caution when using offline folders!!!

Multiple choice question:

Scenario:
You copy some important data files to your server. You make that folder available offline. You realize that the .pst and .xls files are not getting backed up. You decide that you want to stop using the offline folder and change the folder back to "online" again.

Q: What happens to the folder on the server when you decide to turn off the "make available offline" option on that folder?

A) Windows deletes the cached files and folders from your local hard drive cache (\%systemroot%\csc) and reverts the server folder back to normal, just like it was before you turned on the "make available offline" option.

B) Windows deletes the cached files and folders from your local hard drive cache (\%systemroot%\csc) and also deletes the original files and folders from the server leaving you with total data loss.

If you answered B, you are correct. I have no idea why Microsoft decided that this would be the desired functionality.

I am in the process of recovering part of the data that I had moved to my server. I am unable to get the data off of the server, so I have lost all of the .pst, .xls, .mdb, etc. files. Those will have to be restored from my last backup. I powered off my machine right after this happened to prevent the unlinked NTFS files from being overwritten. I installed Windows 2000 to a second hard drive and installed a file recovery program to that hard drive and am in the process of copying over the CSC cache to my second hard drive. The only problem is that the CSC cache files are all numbered. I am guessing that the filenames were stored in the registry, so now I have 10,000 files with no filenames. The data (minus the .pst and .xls) is all there, but I have no idea which file is which.

Be cautious before you decide to turn off the "make available offline" It does warn you that it will delete files. I thought that meant that it was going to delete the cache, and not both the cache and originals.

You may ask why I didn't copy the server folder locally before I turned off the "make available offline" option. I tried to, and I backed up about half of the data when it hit a Favorites shortcut that had a very long filename. Since it couldn't copy that file, it aborted the rest of the copy. Why doesn't Microsoft just allow you to skip the copy of a certain file and continue on with the rest of the copy?

Anyhow, use caution and make frequent backups.



Tyler April 06, 2003


You must log on before posting a comment.

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




Top Viewed ArticlesView all articles
PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Windows, Unix, Linux Interoperability

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing