
by Ed Bott
When you attempt to open an icon, Windows checks the file's extension against a database of registered file types to determine what action it should take. A registered file type can have multiple actions (open and print, for example), all of which are available on the right-click shortcut menus. Windows uses the default action when you launch the icon. If Windows does not recognize the file type, it offers a dialog box and lets you choose which application to use with the file you've selected.
File extensions have been around since the very first version of DOS. Beginning with the first release of Windows 95, Microsoft began tracking file types as well. File types are inextricably linked to file extensions, but the relationship isn't always easy to understand. Here are the essential facts you need to know:
Most application programs handle the details of registering file types and associations when you install them. Creating a file type manually and editing an existing file type are cumbersome and difficult processes best reserved for expert users as a last resort.
TROUBLESHOOTING:My document appears to have the correct extension, but when I try to open it, the wrong application launches. You or another user tried to add or change the file extension manually by adding a period and the extension. The associated program added its own (hidden) extension as well, resulting in a file name such as Letter.doc.rtf. To see the full name, including extensions, choose View, Folder Options, click the View tab, and remove the check mark from the box next to the option labeled Hide File Extensions for Known File Types. The file extension is now visible and editable. Be sure to restore this option after you repair the problem filename.
To see a list of all registered file types, open the Windows Explorer or any folder window (including My Computer). Choose View, Folder Options, and click the File Types tab. You'll see a list like the one in Figure 7.1.
FIG. 7.1 Use this list of registered file types to see which applications are associated with the various file types.
The list is arranged in alphabetical order by file type. As you scroll through the list, note that the details in the dialog box change. For each entry in the list, you can view the registered file extensions, MIME details, and the name of the associated application.
CAUTION: Multipurpose Internet Mail Extensions (MIME) are the standards that define how browsers and mail software should handle file attachments. Do not adjust these settings in the File Types dialog box unless you are certain the changes will produce the correct result. Unnecessary tinkering with these settings can cause your mail and web pages to be unreadable.
Windows allows you to associate only one program with each action for each file type. In most cases, if two applications claim the right to edit or open a given file type, the one you installed most recently will claim that file type as its own. If a newly installed program "hijacks" a file type in that way, you might want to restore the association with the older application. You have two options for accomplishing this goal:
FIG. 7.2 Use caution when manually editing file types. Entering a wrong setting in this dialog box can hinder your ability to work with common document types.
FIG. 7.3 Change the program listed here to adjust how Windows works with a given file type.
CAUTION: Note that some actions require Dynamic Data Exchange (DDE), an extremely complex process that passes information between programs; if you see these options listed, exit this dialog box and don't attempt to edit the action by hand.
Three options in the Edit File Type dialog box are worth noting here:
CAUTION: It's possible to completely eliminate a file type or an action associated with a file type. Generally, however, such a drastic step is not recommended. The settings for each file type take up a trivial amount of space in the Windows Registry, and removing a file type can cause installed programs to fail.
You might have several programs at your disposal with which you can view or edit a particular type of file. For example, FrontPage Express and Microsoft Word both allow you to edit HTML files. Unfortunately, Windows forces you to associate one and only one program with the default action for each registered file type. However, you can override that default decision at any time and choose which program you want to use for a given file icon. To do so, follow these steps:
FIG. 7.4 Use this dialog box to open a document with the application of your choice instead of the default program.
When you attempt to open the icon for an unrecognized file type, Windows displays an Open With dialog box similar to the one shown in Figure 7.4. There are two crucial differences between this dialog box and the one that appears when you hold down the Shift key and click a recognized file type. These differences are designed to enable you to quickly create a new file type for the unrecognized type.
If you accidentally create a new file type by using this dialog box, it's easy to remove that file type. Open the Folder Options dialog box, click the File Types tab, select the newly created file type, and click the Remove button.
A hard disk with a capacity measured in gigabytes can hold tens of thousands of files in hundreds or even thousands of folders. So you shouldn't be surprised if you occasionally lose track of one or more of those files. Fortunately, Windows includes a handy utility that lets you hunt down misplaced files, even if you can't remember the file's exact name. You can search for a portion of the name, or you can search for some other detail, such as the size and type of the file, the date it was created, or a fragment of text within the file.
To begin searching for a file on a local disk or on a shared network drive, click the Start button and choose Find, Files or Folders. (If the Windows Explorer is open, choose Tools, Find, Files or Folders.) You'll see a dialog box like the one in Figure 7.5.
FIG. 7.5 Use the Find utility to search for any file--anywhere on your computer or across a network.
The most common type of search is to look for a file when you remember all or part of the name. Here's how:
TIP: DOS-style wildcards (* and ?) are not required in the Named box, but they can be extremely useful in helping you reduce the number of matches. For example, if you enter the letter b, Windows will return all files that include that letter anywhere in the name. On the other hand, a search for b* will find only files that begin with b, and a search for b???.* will return only files that begin with the letter b and contain exactly four characters, not counting the extension.
The Windows desktop
The My Documents folder
Document Folders, which includes My Documents and the Desktop folder
Any local drive
Any mapped network drive
All local hard drives My Computer (searches all local hard drives as well as floppy and CD-ROM drives)
TIP: You can specify multiple locations in the Look In box. Enter the full path, including the drive letter or UNC-style server and share name, for each location. Separate the entries in this list with semicolons.
The more details you provide, the more restrictive the results will be. But don't provide too much information, or there's a good chance that you'll miss the file you're looking for, especially if the spelling of the filename is even slightly different from what you enter.
Windows compares the text you enter in the Named box with the name of every file and folder in the specified location, returning a result if that string of characters appears anywhere in a filename. For example, if you enter "log" as the search parameter, Windows will turn up all files that contain the words log, logo, catalog, or technology (see Figure 7.6). A search's results appear in a pane at the bottom of the Find dialog box.
By default, the results list appears in Details view. However, you can right-click in the results pane and use the shortcut menu to change to a different view. You can also click on the column headings to sort results by name, size, type, the date the files were last modified, or the folder in which the files are stored. Click again to sort in reverse order.
TIP: After you complete a Find, look at the status bar at the bottom of the window. The message Monitoring New Items means that Windows continues to watch your actions and will update the results list automatically if you create, rename, move, or delete files that match the specified criteria.
The Find utility is fast and extremely effective, even when you haven't the vaguest idea what the target file is named. Advanced options let you search by using other criteria.
FIG. 7.6 The Find utility returns all filenames that include the characters you enter. Click on any column heading to sort the results.
If you have a general idea of when you created a file or when you last edited it, click the Date tab and narrow the search by date. Spinners let you specify ranges of dates by day or month. To find all files you worked with yesterday or today, for example, click the Find all files option, choose Modified from the drop-down list, and choose the option During the Previous 1 Day(s). You can also specify a range of dates, as illustrated in Figure 7.7.
FIG. 7.7 Narrow your search by entering a range of dates.
You can type dates into this dialog box, but it's far easier to use the built-in calendar controls that appear when you click drop-down arrows in date boxes (see Figure 7.8). On the calendar that appears, click the month heading to produce a menu of months; click the year to reveal a spinner control that lets you quickly adjust the year.
Click the Advanced tab to search for files by type and by size. On this tab (shown in Figure 7.9), you can select only registered file types. Because it requires you to enter size parameters in kilobytes, be sure to multiply by 1,000 when specifying megabytes.
FIG. 7.8 This calendar appears automatically when you click the drop-down arrow.
FIG. 7.9 This set of search criteria lets you hunt down large graphics files.
TIP: Use the Find utility to organize and archive files. For example, you can search for all Microsoft Word files modified more than six months ago and then move the results to a backup location on the network. Or you might use advanced Find parameters to search for files larger than 1MB in size. If you leave all boxes blank and check the Include Subfolders option, the resulting list will include all files on your computer, up to a maximum of 10,000. You can then sort that list to find files of a certain type or size.
With the help of the Find utility, you can also search for text within files. Obviously, it won't do you much good to search for common words like "the," but if you remember a specific phrase that appears in a lost document, you can have Windows track down all files that contain that phrase. To look for a draft of your company's annual report, for example, click the Name & Location tab and enter annual report in the Containing Text box. Click the Find Now button to begin searching. Note that text searches can take a very long time, especially on large hard disks or across a network.
TIP: Combine the settings from the Find dialog box to narrow your search for a specific file. For example, you might order Windows to search for a Microsoft Word document that contains the phrase "annual report" and was last modified in February, 1998. With those specifics, you have a good chance of finding the file you're looking for, even if you can't remember what you named it.
If the search didn't find the file you were looking for, modify the criteria and click the Find Now button again. Or, to clear all criteria and start from scratch, click the New Search button.
Because the Find dialog box is actually a specially modified version of the Windows Explorer, you can use the results pane for virtually any file management task. Right-click on any icon to display a shortcut menu that includes file management options, or drag items from the results pane and drop them anywhere--in a folder window, the Windows Explorer, the desktop, or an email message.
Use the File menu or right-click for these choices:
The Find utility includes an extremely powerful feature that's so well hidden even many Windows experts don't know it exists. Select any file in the results pane and choose File, Open Containing Folder. This choice, available only from the main menu and not from the right-click shortcut menus, opens a window displaying the full contents of the folder that contains the file you selected in the Find Results pane.
If you find yourself performing the same search regularly, save the search criteria as an icon so you can reuse it later. To save a search and use it later, follow these steps:
CAUTION: When you reuse a saved search, the results are not up to date. The Options menu in the Find dialog box includes a Save Results menu item, but checking this option might not produce the effect you expect. Save Results keeps the search results pane open, displaying the names of the files you found. The next time you use that saved search, the results pane will reappear, but the contents will not reflect files you've added, deleted, or renamed since the last time you used the search. To update the list, you must click the Find Now button.
File compression utilities make it possible to pack large files into small spaces. Therefore, they enable you to store large numbers of files in a single archive. Windows 98 users will typically encounter compressed files in one of two formats:
The Windows Explorer treats cabinet files as though they were folders. You can open a cabinet file, browse its contents, and copy files by opening a cabinet file. Windows also includes a command-line utility with which you can pull one or more compressed files out of a cabinet. This capability is useful when Windows won't boot and you need to replace a lost or corrupted system file in order to reinstall or repair Windows. The Extract tool also lets you list the files in a cabinet so you can determine the exact location of the file you're looking for. To see detailed instructions on this command, go to an MS-DOS prompt, type EXTRACT /?, and press Enter.
ON THE WEB: Although many utilities let you work with Zip files, the best by far is WinZip, from Nico Mak Computing. Download the shareware version fromhttp://www.winzip.com
Whenever you right-click on a file or folder, one of the choices on the shortcut menu is Send To. Selecting this option opens a submenu containing destinations to which you can send the selected icon with one click. The result is the same as if you had selected the file and dropped it directly on a shortcut. This is an extremely handy way to move files around without having to open Explorer windows.
All the entries on the Send To submenu are shortcuts stored in the \Windows\SendTo folder. When you first install Windows 98, the Send To menu includes a relatively small number of destinations: your default floppy drive, the Windows desktop, and the My Documents folder. Programs like Microsoft Outlook, Microsoft Fax, and the Web Publishing Wizard add shortcuts to this list, as does the Windows PowerToys collection.
It's simple to add new shortcuts in the SendTo folder. When you do, the new shortcuts immediately show up on the Send To menu. You can add shortcuts to local or network folders, printers, applications (such as Notepad or WordPad), or drives. You can even create a cascading menu by creating a subfolder in the SendTo folder and then creating shortcuts in that subfolder.
To customize the Send To menu, follow these steps:
When you finish, select an icon, right-click, and choose Send To. You'll see an expanded menu like the one in Figure 7.10. It should include all the shortcuts you just added.
FIG. 7.10 When you customize the Send To menu, you increase your one-click file management options.
Customizing the Send To menu can result in some unexpected side effects. If you plan to use this technique, be aware of these facts:
Windows allows you to create names for files and folders by using up to 255 characters. Legal filenames can contain spaces and most special characters, including periods, commas, semi- colons, parentheses, brackets ([]), and dollar signs. However, you are not allowed to use the following characters when naming a file or folder:
: ` " \ / * ? |
Because Windows 98 maintains backward compatibility with older operating systems and applications, the file system automatically generates short filenames from long names you create. Although this process happens in the background, it's important to understand how the rules work.
When you save a file using Windows 98 or a 32-bit Windows application, Windows checks the filename you enter. If the name is a legal MS-DOS name (with no spaces or other forbidden characters), has no more than 8 characters in the name, and has no more than 3 characters in the extension, the short filename is the same as the long filename. If the long filename contains spaces or other illegal characters, or if it is longer than 8 characters, Windows uses performs the following actions to create a short filename:
CAUTION: Several books and computer magazines have published details for adjusting a Registry setting (NameNumericTail) that controls the way in which Windows automatically generates short filenames from the long filenames you create. Do not make this Registry change! The result can seriously affect the operation of some Windows accessories that depend on the Program Files folder. For more details on this problem, go to http://support.microsoft.com and search for Knowledge Base article Q148594.
There is no way for the user to change the automatically generated short filename. To see the MS-DOS-compatible name for any file, right-click its icon, choose Properties, and click the General tab.
If you use 16-bit Windows programs, you will not be able to see long filenames in common dialog boxes such as File Open and File Save As. Instead, you'll see the truncated short version of all filenames. You'll see the same results if you use the old-style Windows File Manager (see Figure 7.11).
Through a process called tunneling, Windows allows you to preserve long filenames even when you edit them by using older programs. If you create a file and give it a long name by using Windows or a 32-bit Windows program, and you then edit the file by using a 16-bit program and save the file to the same short filename, Windows will preserve the long filename.
FIG. 7.11 When you view files using 16-bit Windows programs, you see only the short filenames, not their long equivalents.
When you open an MS-DOS Prompt session within Windows 98, Windows recognizes long filenames and allows you to work with them directly. By default, directory listings display the DOS-compatible short name at left and the long name at right, as shown in Figure 7.12.
FIG. 7.12 Enter DIR in an MS-DOS Prompt session to see long and short filenames.
When managing files from an MS-DOS prompt, you can use either the long or short version. If you want to display, rename, copy, or move a file using a long filename that contains one or more spaces, you must enclose the entire name and path in quotation marks.
If you work on a network in a mixed Windows environment (in which some users are running 16-bit Windows applications on Windows 95/98 and some are running Windows NT 4.0), the potential for confusion with long and short filenames is enormous. When using 16-bit Windows applications, users see only the short filenames; the short filenames are also visible if you boot a Windows 98 machine in MS-DOS mode or if you copy files to a machine that is running DOS or Windows 3.x.
Like Windows 95 and Windows 98, Windows NT 4.0 also automatically generates short filenames when you save a file, but it uses a slightly different algorithm for creating short names. Under NT 4.0, the rules are the same as those in Windows 95 and 98 for the first four filenames in a series. Beginning with the fifth name, however, NT switches to a confusing new scheme that starts with only the first two letters of the long filename. To assign the rest of the short name, NT mathematically manipulates the remaining letters in the long filename.
Each time you move or copy files between NT and Win95 PCs, the operating system on the destination machine generates a new short filename. Thus, a file with a short name under Windows 98 of Letter~5.doc might become Lefaff~1.doc.
Worse, NT's file-naming algorithm is case-sensitive, unlike that in Windows 95 and 98. So moving files might cause them to be renamed in an order that appears arbitrary unless you know exactly what happened. Users who copy files from a Windows 95 or 98 workstation to a Windows NT server and then try to access them through the File Open dialog box of a 16-bit Windows application will have no way of knowing which file is which, short of blindly opening each one.
In mixed environments where some users will regularly encounter shared files with automatically generated short filenames, your best bet is to avoid long filenames completely. Devise an MS-DOS-compatible file-naming scheme that requires all filenames to be of eight characters or less.
The Windows Explorer lets you view and manage files and folders across a network, provided you have a working network connection and sufficient permissions. Use the Network Neighborhood to view all available network resources or to map shared resources to drive letters to make them easier to work with. If you know the exact name of the shared resource, you can enter it directly into any Windows common dialog box.
Icons for other computers, including Windows workstations and network servers, appear in the Network Neighborhood. You'll typically see some or all of the following icon types when you open the Network Neighborhood:
When you open a computer icon in Network Neighborhood, you see all the named shares available on that computer. These may be individual drives, folders, printers, or fax modems. Before you can browse shared files and folders or print to a shared printer, you must have permission to use that resource.
To connect with a shared resource, follow these steps:
FIG. 7.13 The Network Neighborhood displays all shared resources available on other workstations and servers.
For more information about sharing resources on your computer with other network users, see Chapter 43, "Sharing Network Resources."
TROUBLESHOOTING:When I attempt to connect to a shared drive or folder on a Windows NT server, I'm asked to supply a password for \\servername\IPC$. What's the problem? Your computer has successfully created an interprocess communication (IPC) connection with the Windows NT resource, but your username and password are not recognized by the NT domain controller. You must log off and log on again using an account that is valid on the domain.
In Windows programs and in the Start menu's Run dialog box, you can specify any file by entering its Universal Naming Convention (UNC) path name. To use a UNC name, you must follow this syntax:
\\computername\sharename\path
For example, if a coworker whose computer is named BillG has created a shared folder named Budget and has given you permission to access that folder, you can browse his shared files by entering \\Billg\Budget in the File Open dialog box and pressing Enter. You can also create a shortcut to a shared network drive or folder using the UNC name of the resource.
Drive mapping, as the name implies, lets you assign a virtual drive letter to a shared network resource. When you map a network drive, you refer to it using the drive letter, just as though it were a local drive on your own computer.
There are two reasons why you might want to map drive letters. First, it makes working with files more convenient; instead of browsing through the Network Neighborhood, you can simply choose a drive letter from the Drives drop-down list in a common dialog box. Second, some older programs (and even some components of Windows 98) do not allow you to browse network resources directly; in such cases, the only way to access a shared file or folder is to first map it to a drive letter.
To map a shared drive or folder, follow these steps:
FIG. 7.14 Mapping a shared folder to a drive letter is the only way to use network resources with some programs.
NOTE: All mapped drives appear in the My Computer window alongside the icons for local drives. The label for a mapped drive includes the share name, server name, and drive letter.
To remove a drive mapping, follow these steps:
Large networks can include hundreds of computers across different domains and workgroups. On large networks, just opening the Network Neighborhood and displaying all the icons in it can take minutes. To find a specific computer without browsing through the entire network, follow these steps:
FIG. 7.15 To avoid long delays when you open the Network Neighborhood, search for a computer name instead.
TIP: Right-click a computer name and choose Properties to see more information about the computer, including the name of the workgroup or domain it belongs to and the operating system it uses.
You can do certain things from an MS-DOS prompt that you can't do any other way, and for some people an MS-DOS session is the most efficient way to work. By using the DIR command and MS-DOS wildcards, for example, you can quickly display a filtered list of files within a given folder and redirect the output to a text file. In addition, the MS-DOS prompt offers the only way to quickly rename a group of files using wildcards, and it's the fastest way to change the extension (and thus the file type) of some types of documents without having to adjust Windows Explorer preferences.
NOTE: MS-DOS commands are not case-sensitive. Although the examples given here follow standard MS-DOS conventions and list commands and switches in all caps, you can enter any such command using lowercase letters.
To open an MS-DOS Prompt session within Windows, open the Start menu and choose Programs, MS-DOS Prompt.
Note that an MS-DOS Prompt session behaves differently from the command prompt that appears when you restart your computer in MS-DOS mode. Here are some key differences:
TIP: To switch between a windowed MS-DOS Prompt and a full-screen display, press Alt+Enter.
To close an MS-DOS Prompt window, type EXIT at the prompt and press Enter.
You must use a special set of procedures for copying text to and from an MS-DOS Prompt window. These procedures are particularly useful when you need to copy a lengthy filename, complete with its full path. Follow these steps:
FIG. 7.16 Use this pull-down menu to cut, copy, and paste text between an MS-DOS window and the Windows Clipboard.
In Windows programs and in the Start menu's Run dialog box, you can specify any file by using its Universal Naming Convention (UNC) path name. In an MS-DOS Prompt window, however, UNC names are not recognized. To list or manage shared files across the network from an MS-DOS Prompt session, you must first map the share to a drive letter. Use the procedures outlined earlier in this chapter to do so.
To map a drive letter at the MS-DOS prompt, type NET USE driveletter: \\servername\ sharename (substitute the appropriate drive letter, server name, and share name). For more details about this command, type NET USE /? and press Enter.
Some file management tasks can be performed only from an MS-DOS Prompt window (or with the help of a third-party utility). For example, if you want to see a list of hidden folders on a given system, open an MS-DOS window, log onto C:\, and issue the command DIR /AHD. If you want to duplicate the directory structure from one machine to another without copying any files, use XCOPY with the /T and /E switches.
Windows 98 stores all external MS-DOS commands (FORMAT, FDISK, and XCOPY, for example) in the Windows\Command folder. Internal commands, shown in Table 7.1, are embedded in COMMAND.COM, the command interpreter that loads whenever you open an MS-DOS Prompt window.
| For Use in MS-DOS Batch Files | ||
| CALL | FOR | GOTO |
| IF | LFNFOR | LOADHIGH |
| REM | PAUSE | SHIFT |
| For Use in Setting the MS-DOS Environment | ||
| BREAK | CHCP | CLS |
| CTTY | DATE | ECHO |
| EXIT | PATH | PROMPT |
| SET | TIME | VER |
| For Working with Files and Disks | ||
| CD | CHDIR | COPY |
| RD | RMDIR | DEL |
| DIR | ERASE | LOCK |
| MD | MKDIR | REN |
| TYPE | UNLOCK | VERIFY |
| VOL | ||
In Windows 98, internal and external MS-DOS commands are poorly documented; for full details about command syntax, you'll need to find other references. Fortunately, only a handful of the MS-DOS commands in Windows 98 have changed since MS-DOS 6.0, so even a classic reference like Que's Using MS-DOS 6.0 will be surprisingly helpful for Windows 98 users. The following tips will help advanced users work more efficiently within an MS-DOS Prompt window:
DIR C:\WINDOWS\*.EXE /S /ON > filename
MORE < filename
© Copyright, Macmillan Computer Publishing. All rights reserved.