Export (0) Print
Expand All
Expand Minimize

Managing Files and Directories

from Chapter 12, Microsoft Windows 2000 Administrator's Pocket Consultant by William R. Stanek.

Microsoft Windows 2000 provides a robust environment for working with files and directories. At the core of this environment are the two basic types of file system:

  • FAT (file allocation table), available in 16-bit and 32-bit versions

  • NTFS (Windows NT file system), available in 4.0 and 5.0 versions

When you work with files and directories on a Windows 2000 system, you'll usually work with one of these file system types. To help you better administer FAT and NTFS volumes, this chapter explains how to perform common file and directory tasks. It also offers ways of troubleshooting problems.

Windows 2000 File Structures

This section covers the essential information you'll need to work with files. An understanding of file basics can make your job as an administrator a lot easier.

Major Features of FAT and NTFS

What you can or can't do with files and directories in Windows 2000 depends on the file system type. Windows 2000 servers and workstations provide direct support for FAT and NTFS.

FAT Volumes

FAT volumes rely on an allocation table to keep track of the status of files and directories. Although FAT is adequate for most file and directory needs, it's rather limited. Two versions of FAT are supported on Windows 2000:

  • FAT 16 The version of FAT widely used on Microsoft Windows NT 4.0. FAT 16 supports a 16-bit file allocation table and is usually referred to simply as FAT. You'll get optimal performance with volumes that are less than 2 GB.

  • FAT 32 The version of FAT introduced with Windows 95 operating system (OS) release 2 and Windows 98. FAT 32 supports a 32-bit file allocation table and is usually referred to as FAT 32. FAT 32 supports smaller cluster sizes than FAT and can allocate space more efficiently. On Windows 2000, FAT 32 supports volumes up to 32 GB.

Table 12-1 provides a brief comparison of FAT 16 and FAT 32 features.

Table 12-1 FAT and FAT 32 Features Comparison

Feature

FAT

FAT32

File allocation table size
Maximum volume size

16-bit
4 GB; best 2 GB or less

32-bit
2 TB; limited in Windows
2000 to 32 GB

Maximum file size

2 GB

4 GB

Operating systems supported

MS-DOS, all versions of Windows

Windows 95 OSR2, Windows 98, and Windows 2000

Supports small cluster size

No

Yes

Supports NTFS 4.0 features

No

No

Supports NTFS 5.0 features

No

No

Use on floppy disks

Yes

Yes

Use on removable disks

Yes

Yes

Using NTFS

NTFS offers a robust environment for working with files and directories. There are two versions of NTFS:

  • NTFS 4.0 The version used with Windows NT 4.0. It features full support for local and remote access controls on files and directories as well as support for Windows compression. It doesn't support most Windows 2000 file system features.

  • NTFS 5.0 The version used with Windows 2000. It features full support for new Windows 2000 features, such as Active Directory directory service, disk quotas, and encryption. It is only supported by Windows 2000 and minimally by Windows NT 4.0 with Service Pack 4 or later.

Note: If you created NTFS volumes on Windows NT 4.0 and upgraded to Windows 2000, the volumes aren't upgraded automatically to NTFS 5.0. You must specifically choose to upgrade the volumes during installation of the operating system or when you install Active Directory on a Windows 2000 server.

Table 12-2 provides a brief comparison of NTFS 4.0 and NTFS 5.0. Windows NT 4.0 systems with Service Pack 4 or later can access NTFS 5.0 files and directories, provided they don't use any of the new NTFS features.

Table 12-2 NTFS 4.0 and NTFS 5.0 Features Comparison

Feature

NTFS 4.0

NTFS 5.0

Maximum volume size

32 GB

2 TB

Maximum file size

32 GB

Only limited by volume size

Operating systems supported

Windows NT 4.0, Windows 2000

Windows 2000 and Windows NT 4.0 minimally

Advanced file access permissions

Yes

Yes

Supports Windows compression

Yes

Yes

Supports Windows encryption

No

Yes

Supports Active Directory structures

No

Yes

Supports sparse files

No

Yes

Supports remote storage

No

Yes

Supports disk quotas

No

Yes

Use on floppy disks

No

No

Use on removable disks

Yes

Yes

File Naming

Windows 2000 file naming conventions apply to both files and directories. For simplicity, the term "file naming" is often used to refer to both files and directories. Although Windows 2000 file names are case-aware, they aren't case-sensitive. This means that you can save a file named MyBook.doc and the file name will be displayed in the correct case. However, you can't save a file called mybook.doc to the same directory.

Both NTFS and FAT support long file names—up to 255 characters. You can name files using just about any of the available characters, including spaces. However, there are some characters you can't use. They are

? * / \ : " < > |

Tip Using spaces in file names can cause access problems. Anytime you reference the file name, you may need to enclose the file name within quotation marks. Also, if you plan to publish the file on the Web, you may need to remove the spaces from the file name or convert them to the underscore character (_) to ensure that Web browsers have easy access to the file.

The following file names are all acceptable:

  • My Favorite Short Story.doc

  • My_Favorite_Short_Story.doc

  • My..Favorite..Short..Story.doc

  • My Favorite Short Story!!!.doc

Accessing Long File Names Under MS-DOS

Under MS-DOS and 16-bit FAT file systems, file and directory names are restricted to eight characters with a three-character file extension, such as CHAPTER4.TXT. This naming convention is often referred to as the 8.3 file-naming rule or the standard MS-DOS file-naming rule. Because of this rule, when you work with files at the Command prompt you may have problems accessing files and directories.

To support access to long file names, abbreviated file names are created for all files and directories on a system. These file names conform to the standard MS-DOS file-naming rule. You can see the abbreviated file names using the command

dir /X

A typical abbreviated file name looks like this:

PROGRA~1.DOC

How Windows 2000 Creates an Abbreviated File Name

When Windows 2000 creates an abbreviated file name from a long file name, it uses the following rules:

  • Any spaces in the file name are removed. The file name My Favorite Short Story.doc becomes MyFavoriteShortStory.doc.

  • All periods in the file name are removed (with the exception of the period separating the file name from the file extension). The file name My..Favorite..Short..Story.doc becomes MyFavoriteShortStory.doc.

  • Invalid characters under the standard MS-DOS naming rule are replaced with the underscore character (_). The file name My[Favorite]ShortStory.doc becomes My_Favorite_ShortStory.doc.

  • All remaining characters are converted to uppercase. The file name, My Favorite Short Story.doc, becomes MYFAVORITESHORTSTORY.DOC.

Afterward, the rules of truncation are applied to create the standard MS-DOS file name.

The Rules of Truncation

To make the file conform to the 8.3 naming convention, the file name and file extension are truncated, if necessary. The rules for truncation are as follows:

  • The file extension is truncated to the first three characters. The file name Mary.text becomes MARY.TEX.

  • The file name is truncated to the first six characters (this is the file's root name) and a unique designator is appended. The unique designator follows the convention ~n, where n is the number of the file with the six-character file name. Following this, the file name My Favorite Short Story.doc becomes MYFAVO~1.DOC. The second file in this directory that is truncated to MYFAVO becomes MYFAVO~2.DOC.

Note: The file name truncation rule described here is the one you'll usually see, and you won't often have to worry about anything else. However, if you have a lot of files with similar names, you may see another convention used to create the short file name.

Specifically, if more than four files use the same six-character root, additional file names are created by combining the first two characters of the file name with a four-character hash code and then appending a unique designator. A directory could have files named MYFAVO~1.DOC, MYFAVO~2.DOC, MYFAVO~3.DOC, and MYFAVO~4.DOC. Additional files with this root could be named MY3140~1.DOC, MY40C7~1.DOC, and MYEACC~1.DOC.

Exploring Files and Directories

Windows Explorer is the tool of choice for working with files and directories. You can also use My Computer and My Network Places to perform many file manipulation tasks. Access My Computer and My Network Places by double-clicking their icons on the Windows 2000 desktop.

Note: For brevity, this section focuses primarily on using Windows Explorer. However, you can apply similar techniques to My Computer and My Network Places.

Using Windows Explorer

To run Windows Explorer, go to Start, choose Programs, choose Accessories, and then select Windows Explorer. You can now use Windows Explorer to browse local and remote resources.

Windows Explorer Views and Toolbars

Windows Explorer can use multiple viewing panes. These panes include

  • Explorer Bar Shows different views depending on the current action. The available views are Folders, Search, History, and Favorites. Folders is the default view.

  • Contents Shows the contents of a selected folder or the results of a search.

  • Tip Of The Day Displays helpful pointers for working with Windows 2000.

As Figure 12-1 shows, individual folders can have custom views as well. By default, Windows Explorer displays only the Explorer Bar and the Contents view. To modify the view panes, you can

  • Display other views on the Explorer Bar Select View, choose Explorer Bar, and then select the view you want to use.

  • Display the Tip Of The Day Select View, choose Explorer Bar, and then select Tip Of The Day.

  • Remove the Explorer Bar or Tip Of The Day Click Close (the X in the upper left or upper right corner of the pane).

To change the settings for the Contents view, you use the View menu as well. Selected items are enabled. Cleared items are disabled. The main options you want to use are

  • Toolbar Allows you to add and remove toolbars.

  • Status Bar Adds a status bar that displays information about objects that are selected.

  • List Displays a list of files and folders instead of the detailed listings or file icons.

    Figure 12-1: My Pictures has a custom view. You can customize Windows Explorer folders to use a similar view or other views to suit your needs. Your settings are saved when you exit Windows.

    Figure 12-1: My Pictures has a custom view. You can customize Windows Explorer folders to use a similar view or other views to suit your needs. Your settings are saved when you exit Windows.
  • Details Displays detailed listings for files and folders. The detailed view adds file size, file type, and modification date to the Contents panel.

  • Small Icons Displays small icons for files and folders.

  • Large Icons Displays large icons for files and folders.

  • Arrange Icons Allows you to arrange files and folders by name, type, size, and date. In detailed view, clicking on the column headers has the same effect.

  • Thumbnails Allows you to view a miniature version of an image that you can use for quick browsing.

Understanding Windows Explorer Icons

Each icon displayed in Windows Explorer has a purpose. Key icons displayed in the Folders pane are used as follows:

  • Desktop A top-level folder that stores files, folders, and shortcuts on the Windows desktop. This folder is at the same level in the hierarchy as My Network Places and My Computer.

  • My Computer A top-level folder containing all local resources and folders available to the computer.

  • My Network Places The top-level folder for the network. Click this to browse network resources.

  • Recycle Bin A folder that stores files and directories that have been deleted. If the system is configured to use the Recycle Bin, you can recover files from this folder before they're permanently removed.

  • My Documents A folder used to store personal files. In My Documents you'll find the My Pictures folder, which has special features for previewing images.

  • Drives Storage devices that are identified with unique icons and drive letters. Windows 2000 shows hard disk drives, floppy disk drives, removable disk drives, and CD-ROMs.

  • Network Drives A remote network resource that's connected to the system.

  • Open Folders Folders that have been accessed by clicking them. Open folders show their contents in the Contents pane.

  • Closed Folders Folders that have not been accessed. Closed folders don't display their contents.

Tip To expand a folder without displaying its contents in the Contents pane, click the plus (+) symbol next to the folder. This technique allows you to browse folders on remote systems faster than usual.

You can also use this technique when you're copying files. Here, you display the contents of the folder you want to copy in the Contents pane, and then browse for the destination folder in the Folders pane. When you find it, you copy the source files to the folder.

Displaying Hidden and Compressed Files in Windows Explorer

As an administrator, you'll often want to see system files, such as DLLs (dynamic-link library files), and files that have or haven't been compressed. By default, however, Windows Explorer doesn't display hidden file types or differentiate between compressed and uncompressed files. To override the initial settings, from the Tools menu select Folder Options, and then click the View tab. You can now configure new settings using the dialog box shown in Figure 12-2.

  • To display hidden files, click Show Hidden Files And Folders.

  • To always display file extensions, clear the Hide File Extensions For Known File Types check box.

  • To display operating system files, clear the Hide Protected Operating System Files check box.

  • To highlight compressed files and folders, select the Display Compressed Files And Folders With Alternate Color check box.

Customizing Folder Views

When Web content is enabled, Windows Explorer supports customizable views for all folders on a Windows 2000 system. You can change the look and feel of the view on individual folders or on all folders on a system.

Working with Folder Templates

Windows Explorer uses template files to determine what each folder looks like in the Contents pane. It creates these templates as HTML documents and you can edit them just like any Web document. The technologies used to create the templates are HTML (Hypertext Markup Language), CSS (cascading style sheets), and scripts. Scripts are used to customize the folders and make them more interactive. Normally, scripts are written in JavaScript but can also be written in VBScript. The predefined templates are

  • Standard A full-featured template that shows document previews and summaries.

  • Classic (Icons Only) A quick and efficient no-frills view.

  • Simple A basic view that has some Web-enabled features but doesn't use scripts.

  • Image Preview A view with special features for previewing images.

Folder view settings you use are seen by all users who access the system, either locally or remotely. The default view for most folders is Standard. You can change the view by customizing the folder, provided you have write permissions on the folder. If you like a particular view, you can apply it to all your folders on the system as well. To do this, you must have ownership of the folder.

Figure 12-2: Set options for Windows Explorer using the Folder Options dialog box.

Figure 12-2: Set options for Windows Explorer using the Folder Options dialog box.

Note: In Standard view, a preview window displays viewable documents and images. In order to do this, the operating system starts the necessary application control, reads the document or image, and then displays a preview of the document or image.

In addition to being able to change folder templates, you can also add backgrounds and comments to folders. Backgrounds are displayed behind all the icons and text in a folder. Comments are displayed in the folder's summary pane, and you can use them to explain what the folder contains. The changes you make for backgrounds and comments are added to the current folder's template as a customization.

Enabling Web Content for Folders

Folder templates are used only when Web content is enabled for folders. The enabling or disabling of this feature is based on options set in Windows Explorer, which are different for each user who logs on to a computer. To enable or disable Web content for folders, complete the following steps:

  1. In Windows Explorer, from the Tools menu select Folders Options.

  2. In the General tab, select Enable Web Content In Folders to enable Web content or select Use Windows Classic Folders to disable Web content.

  3. Click OK.

Configuring Custom Folder Views

To configure custom views for folders, follow these steps:

  1. In Windows Explorer, select the folder you want to customize. If you want to customize all the folders on a system, select any folder, and then when you complete this operation, follow the instructions in the section of this chapter entitled "Setting Views for Multiple Folders."

  2. Choose the Customize This Folder option of the View menu. This starts the Customize This Folder Wizard. Read the welcome dialog box, and then click Next.

  3. Select the type of customization you want to make, shown in Figure 12-3:

    • Choose Or Edit An HTML Template For This Folder Select this option to select or create a new template for the folder.

    • Modify Background Picture And Filename Appearance Select this option to add background colors and images to a folder.

    • Add Folder Comment Select this option to type a descriptive comment for the folder.

  4. If you choose to work with templates, use the Change Folder Template dialog box to select a new template. The available options are: Standard, Classic (Icons Only), Simple, and Image Preview. If you want to edit the template file, select I Want To Edit This Template.

    Caution: Template files are written using advanced scripting technologies. If you have experience working with these technologies, you'll find it easy to modify the template files. You'll find it easy to modify the template files—but be very careful. Incorrect edits may make the template unusable, and you'll need to repeat this procedure to assign a new template to the folder.

  5. If you chose to work with backgrounds, use the Modify Background And Filename Appearance dialog box to select background and text settings. You can choose a predefined background picture by using the list box provided or by clicking Browse to find an image to use. After you select an image, you can change the foreground and background colors used with file names by clicking Text and Background (see Figure 12-4).

  6. If you chose to add a comment, use the Add Folder Comment dialog box to type a comment for the folder. If you plan on applying the template to all folders on the system, you may want to leave this blank for now.

  7. Click Next, and then click Finish. The folder view is then applied to the current folder.

    Figure 12-3: Use the Customize This Folder Wizard to choose a folder template to use. Folder templates are created with HTML, CSS, and scripts.

    Figure 12-3: Use the Customize This Folder Wizard to choose a folder template to use. Folder templates are created with HTML, CSS, and scripts.

    Figure 12-4: Select a background picture and modify the file name appearance.

    Figure 12-4: Select a background picture and modify the file name appearance.

Setting Views for Multiple Folders

Using the Folder Options dialog box, you can apply a custom view to all your folders on a system or restore the default view to all your folders on a system. To do that, complete the following steps:

  1. In Windows Explorer, select the folder you want to work with. You can apply the view settings for this folder to all your folders on a system.

  2. From the Tools menu choose Folder Options, and then select the View tab.

  3. To apply the current folder view to all your folders on a system, click Like Current Folder.

  4. To restore all your folders to their default view, click Reset All Folders.

Formatting Floppy Disks and Other Removable Disks

Windows Explorer makes it easy to work with floppy and other removable disks. You can format disks by following these steps:

  1. Insert the floppy or other removable disk you want to format.

  2. Right-click the floppy or other removable disk icon in Windows Explorer's Folders pane.

  3. From the pop-up menu select Format, and then use the Format dialog box to set the formatting options. For floppy disks, the only available file system type is FAT. For other removable disks, such as Zip, you can use FAT, FAT 32, or NTFS.

    Note: If you format removable disks as NTFS volumes, they are formatted as NTFS 5.0 volumes. Unlike Windows NT 4.0, Windows 2000 allows you to eject volumes formatted as NTFS at any time. Click Eject on the removable disk drive or right-click the drive icon in Windows Explorer, and then select Eject.

  4. Click Start to begin formatting the floppy or other removable disk.

Copying Floppy Disks

To copy a floppy disk, follow these steps:

  1. Right-click the floppy disk icon in Windows Explorer's Folders pane, and then from the pop-up menu choose Copy Disk.

  2. Use the Copy Disk dialog box to select the source and destination drives. In the Copy From area, select the drive you want to use as the source. In the Copy To area, select the drive you want to use as the destination. If you have only one floppy disk drive, the source and destination drive will be the same (as shown in Figure 12-5).

  3. Click Start when you're ready to begin copying, and then insert the source and destination disks when prompted. The progress bar in the lower area of the Copy Disk dialog box shows the progress of the copy operation.

    Figure 12-5: Use the Copy Disk dialog box to select the source and destination drives.

    Figure 12-5: Use the Copy Disk dialog box to select the source and destination drives.

from Microsoft Windows 2000 Administrator's Pocket Consultant by William R. Stanek. Copyright © 1999 Microsoft Corporation.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft