File Structure - ASU



File Names and Directories

What is a file?

• A way to store a program or a collection of data

• Everything stored on a computer is stored in a file

• There are various types of files

• Files always have names – each file has a unique name

What are some different file types?

• Program files – used to run a computer

• System

• Application programs (Microsoft Word is an example)

• Support files

• Data files Common types of data files are listed here:

• Configuration – contain settings that a program needs to run correctly, they should never be changed or deleted

• Text - standard characters such as letters, numbers, punctuation marks. Almost any application can read a text file or write data to one. They can usually be read on-screen

• Graphics – digitally encoded pictures, must be used by a program that recognizes the file format

• Database or spreadsheet – data that has been stored in the proprietary file format of a database program

• Sound –digitized sounds which can be played back if the computer is equipped with a sound card

• Video – digitized motion photography that can be played by computer programs

• Backup – copies of essential data

What are file extensions?

• The operating system of a computer recognizes file extensions and will open (or use) the correct application to read a file. If the computer doesn’t have an application that recognizes a file type, then the file cannot be read or used on that computer. The following table shows common file extensions:

|FILE TYPE |EXTENSION |

|Program |COM, SYS, EXE |

|Configuration |INI |

|Text |TXT, DOC, |

|Graphic |GIF, JPG, |

|Database |XLS, WK4 |

|Sound |WAV |

|Backup |BAK |

How are files named? - All files must have a name

• Files must be saved and given a unique name. Most application programs supply the extension to a file name when it is being saved. Remember, the filename extension usually indicates what type of file it is.

• Filename Rules: Different operating systems have different rules for filenames.

• Microsoft: 255 characters, and the use of spaces and some punctuation. Some characters cannot be used.

• Macintosh: 31 characters, colon (:) cannot be used

• Extensions must be added, computer won’t do this automatically

• Important when sharing files between operating systems

How do we store and locate files on a computer?

• Terminology – a “drive” is a storage or working location

• “Hard drive” is usually in a computer, can be external or portable

• C:/ drive is the current PC being used (naming convention)

• Other areas in the current PC are possible (D:/ is usually same hard drive)

• External storage

• Floppy disks (A:/drive and sometimes B:/ drive)

• USB or Flash drive, small portable disk, taking the place of floppy disks

• CD/DVD (can be D:/, E:, etc., named separately on each computer, depends on other drives available

• Network drive (at ASU = M:/ drive, files stored on another computer on campus)

What is the structure of saved files?

• Hierarchical system – in folders, and in directories, a tree structure.

• The topmost directory is called the root directory (usually the C:\ drive on a computer).

• A parent directory is in the root directory. It is a top-level folder that contains files and perhaps other folders.

• A directory or folder inside (or below) a parent directory is called a subdirectory.

• A folder can contain multiple files.

• Within a single directory, filenames must be unique. However, two files in different directories may have the same name. In the example below there are two files names 504setup. These files have unique names because their extensions are different (we just don’t see the extensions on this picture, see note at end of document for directions to view extensions). Notice that the file types are different and the files would be saved with different extensions.

[pic]

What is a Directory Path?

• Tree structure or hierarchy. To access a file, specify the names of all the folders (or directories) above it. This is called specifying a path.

• The path is the sequence the computer must follow to locate a file.

• The beginning of the path contains the physical location like drive A: or C:, the back slash \ and the remaining folders and file

• Example below shows the path in the Address window: C:\504Demo\pak\504setup.txt

[pic]

How are files located?

• Windows Explorer (in the picture above) shows the directory structure of a disk and allows files to be manipulated easily.

• Find Windows Explorer by going to Start to All Programs to Windows Explorer

• See files within folders located inside another folder within a directory

• The address line shows the complete path name for the subfolder that is selected.

• Explorer has different views that can be helpful when exploring information.

• Click on the Views icon to see choices

• My Computer is another way to locate files. Go to Start and find My Computer on the right hand menu. There may be a My Computer icon on the monitor screen (desktop)

• Viewing the files is the same as Windows Explorer but there are other options available at the left side of the screen. Tree structure will not be obvious, but path is available (see picture below).

[pic]

NOTE: To view file types click on the Tools menu at the top of the Windows Explorer or My Computer window, next select Folder Options…. At the next window click on Views and uncheck the box for the statement: Hide extensions for known file types. Click OK to return to your work. See below.

[pic]

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

Root directory

Parent directory

Sub directory

Files in sub directory

Path + file name

Path + file name

Uncheck this box to view file extensions

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download