Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lectures_SSD2_Yermakova / Lectures_SSD2 Yermakova.doc
Скачиваний:
226
Добавлен:
25.02.2016
Размер:
3.16 Mб
Скачать

Shortcuts

shortcut is an alternate way to reach a file. Shortcuts have names and live in folders just the way files do. But, a shortcut does not actually hold any data. Instead, it has a shortcut property that specifies the path to the file where the data can be found. This file is called the target of the shortcut. The target can be anywhere, even on a different drive. A shortcut only refers to its target; it is not a copy of the target. So, when you open a shortcut and edit what you find there, you are actually editing the target file.

In the folder hierarchy diagram above, Karen has established a shortcut to Dave's 1999 sales data. The target of this shortcut is C:\Dave\1999\sales.xls. Karen's shortcut is named 99sales. Thus, another way to reach Dave's file is via C:\Karen\99sales. If Karen deletes her shortcut, this does not delete the target; Dave's file is still there. Moving or renaming a shortcut also does not affect the target. But, if Dave moves or renames his sales file, Karen's shortcut may not be able to retrieve Dave's file.

Shortcuts can point to folders as well as to files. To create a shortcut, click with the right mouse button (right-click) the icon for the file or folder that is to be the target and select Create Shortcut from the shortcut menu that appears (coincidentally also known as a pop-up menu). Note that you cannot create a shortcut to another shortcut. If you try, what you get is a shortcut to the target of the first shortcut— same effect as copying the first shortcut. Try creating a shortcut of your own, and then look at its properties.

File Names and Types

In the original DOS file system, also used in early versions of Windows, file names were limited to eight uppercase characters plus a three-character extension, separated by a "dot" (a period). (These are sometimes referred to as 8.3 style file names.) The extension specified the type of the file. For example, a shopping list stored as a plain text file might be called SHOPPING.TXT, while a resume created as a Microsoft Word document might be RESUME.DOC. Here is a list of extensions for common file types:

.txt

Plain text file

.doc

Microsoft Word document

.htm

HTML (Hypertext Markup Language) document

.xls

Microsoft Excel spreadsheet

.gif

GIF image (Graphic Interchange Format)

.jpg

JPEG image (Joint Photographic Experts Group)

.wav

Sound file

.exe

Executable file (binary machine code)

.com

MS-DOS executable ("command" file)

.drv

Driver (for a peripheral device)

.bat

Batch (script) file for the DOS command interpreter

Table 1 File extensions

In newer versions of Windows, file type information is automatically determined from the extension. If you double-click a file with the extension .doc, it will be opened by Microsoft Word, while a file with extension .htm will be opened by your browser (for example, Internet Explorer or Firefox). Newer versions of Windows may actually hide extensions from the user. For example, if you create a Word document called Wedding_Invitation, the actual file name will beWedding_Invitation.doc, but the icon for the file will be labeled Wedding_Invitation. However, you can tell Windows to show you file extensions. From theView pull-down menu, select Options, go to the View tab, and clear the check box labeled Hide extensions for known file types. Now the icon will sayWedding_Invitation.doc.

If you try to open a file whose extension Windows does not recognize, Windows will display a dialog box listing a number of applications and allow you to choose which one to open the file with. Not all of these applications will actually work; it is up to you to choose an application that is appropriate. If you have no idea what is in a file, opening it with a simple text editor like Notepad will let you see if the file is human-readable.