Presentation is loading. Please wait.

Presentation is loading. Please wait.

FILES  A file is a collection of related information  Files are kept in directories on a disk.

Similar presentations


Presentation on theme: "FILES  A file is a collection of related information  Files are kept in directories on a disk."— Presentation transcript:

1 FILES  A file is a collection of related information  Files are kept in directories on a disk.

2 FILES  The two system areas on a disk  Directories  File Allocation Table(FAT) -They enable MS_DOS to recognize and organize the files on your disk. -FAT is copied onto a new disk when you format it with the MS_DOS format command, and one empty directory is created, called the root directory.

3 File Allocation Table  A table that the operating system uses to locate files on a disk.  Due to fragmentation, a file may be divided into many sections that are scattered around the disk.  The FAT keeps track of all these pieces. In DOS systems, FATs are stored just after the boot sector.

4 File Allocation Table  A file system to control how files & folders are stored on your hard disk.  Files are stored in small clusters.  Smaller the cluster, more efficiently the disk stores information.  Cluster depends on the size of the partition, partition depends on the file system used.

5 File Allocation Table  Partitions larger than 2GB are not supported with FAT16.  Partitions smaller than 512MB are not supported with FAT32.

6 File Allocation Table Advantages of FAT32 file system over FAT16:  Allows programs to open more quickly-36% faster.  Uses smaller cluster size, hence more efficient use of disk space-28% more disk space.  Allows hard disk upto 2TB to be formatted as a single drive-no need to partition the hard disk.  Can relocate the root directory and use backup copies of FAT-computer less vulnerable to crashes.

7 Files  For DOS to run an application file, it has to be one of three kinds:.COM.EXE.BAT COM - A file in machine language, must be less than 64K in size. EXE - A file in machine language, can be larger than 64K. EXE files also have information at the beginning of the file that tells DOS what type of file it is and how to load and run it. BAT - A batch file that is written with a text editor and is in ASCII text format, it contains DOS commands that are executed in batch mode, which means that each command is executed in sequence until the file ends.

8 DIRECTORIES  Directories are a way of dividing your files into convenient groups of files.  Directories also contain information on the size of files, and the dates they were created and updated.

9 DIRECTORIES  Directories can also contain subdirectories.  A multilevel directory structure can be thought of as a tree structure, with the root at the top.

10 MULTILEVEL DIRECTORY STRUCTURE ROOT DIR FILE C:\>

11 PATHS  When you use multilevel directories, you must tell MS-DOS where the files are located in the directory structure.  This can be done by giving MS-DOS a pathname to the file.

12 PATHNAME  a pathname is a sequence of directory names followed by a filename, each separated from the previous one by a backslash.  dir_name\dir_name\file_name

13 USING DIRECTORIES  A:\USER\JOE. 12-02-03 10:09a.. 12-02-03 10:09a. working directory \USER\JOE..Parent directory\USER

14 COMMANDS  A command is a way of communicating with the computer.

15 COMMAND OPTIONS  Used to give MS-DOS commands extra information.  The format of all MS-DOS commands: command [options….]

16 COMMAND OPTIONS  Where options can be one of the following:  drive  filename  pathname  switches - options which control MS-DOS commands.  arguments- provide more information to MS-DOS commands. Eg. ON or OFF

17 INPUT AND OUTPUT  MS-DOS always assumes that input comes from the keyboard and output goes to the screen.  However, the flow of command input and output can be redirected.  Input can come from a file rather than a keyboard, and output can go to a file or to a line printer instead of to the screen.  Pipes can be created that allow output from one command to become the input to another,

18 REDIRECTION  dir>newfiles - puts the directory listing in the file new files by overwriting it.  dir>>newfiles - appends the directory listing to an existing file named newfiles.  Sort list1 - sorts the filename names and sends the sorted output to a file named list1

19 FILTERS  A filter is a command that reads your input, transforms it in some way, and then outputs it, usually to your screen or to a file.  FIND - searches for some text in a file.  MORE - Displays text one screenful at a time.  SORT - sorts text

20 COMMAND PIPING  To give more than one command at a time, you can pipe commands to MS-DOS.  Dir|sort|more  dir|sort>direc.fil

21 INTERNAL COMMANDS  The way you do anything in DOS is through commands that the computer understands.  A command may cause the computer to take some action, or to execute some file.

22 INTERNAL COMMANDS  COMMAND.COM is loaded during the boot process, which means that COMMAND.COM is resident in memory at all times, and the commands that it understands are available to the user at all times.

23 INTERNAL COMMANDS  If you have created a DOS boot disk, it will contain three files,  IO.SYS  MSDOS.SYS  COMMAND.COM. HIDDEN

24 INTERNAL COMMANDS  The third file, COMMAND.COM, must be in the root directory. Since it is on the boot disk (you cannot boot without it), that means that the commands it contains are available to you when you boot from this disk.

25 INTERNAL COMMANDS  The internal commands contained within COMMAND.COM are the commands that are used in writing batch files.  The batch file will not run properly if it cannot find COMMAND.COM.

26 DOS Operating System  The interface is Command Line Interface or Character User Interface No mouse,no menus, no graphical components.

27 DOS Operating System  Text commands were entered from the keyboard, and the computer's response appeared as text on the monitor.

28 DOS Operating System  DOS controlled some aspects of the computer hardware, particularly disk access and basic CPU operations, but it was still common to need to configure the video display, sound card, printer, etc. for each application that would use them.

29 DOS Operating System  DOS a single-tasking operating system, i.e only one program could be run at a time.

30 INTERNAL COMMANDS  Some Internal Commands contained within the COMMAND.COM command interpreter: break cd chdir cls copy date del dir echo erase exit md mkdir move path pause prompt rd rem ren rename rmdir type ver vol

31 EXTERNAL COMMANDS Not all DOS commands are understood by COMMAND.COM. There are commands called external commands that reside as separate files on your hard drive, and must be called specifically for you to use them.

32 EXTERNAL COMMANDS If you look in your DOS directory on your hard drive (usually C:\DOS), you will see these external commands represented by files that are either *.EXE or *.COM files.

33 EXTERNAL COMMANDS  Some commands do not need to be loaded into memory every time you boot, because they are used infrequently, or possibly because they are large and take up a lot of space.  These commands are stored as separate files in your C:\DOS directory. (Usually; C:\DOS is the normal default, but during the installation it is possible to specify a different directory.)

34 EXTERNAL COMMANDS  Some External Commands append assign attrib chkdsk Compdeltree diskcomp diskcopy Doskeyeditfc fdisk find format graphics help label moremsbackup msav print replace restore scandisk Sortsystree undelete unformat xcopy

35 THE PATH The Command Line  Everything you do in DOS is done from the command line. The command line begins with a prompt, which is the computer's way of saying "I'm ready. Give me something to do." The prompt usually looks something like this: C:\>

36 THE PATH  From the command line you can do two things: you can run an internal command (one that is contained in COMMAND.COM), or you can run a program.  External commands are programs, which are found in separate files in your DOS directory, so running programs includes running external commands, but it also means running the applications software you use to do things with your computer.  You can also run a batch file, but in that case all you are doing is running a series of commands or programs that are listed in the batch file.

37 THE PATH  If you enter a name that is not recognized by DOS as either an internal command or a program, you get the error message "Bad command or file name"

38 THE PATH  When you enter the name of an executable application file, DOS has to find it. DOS looks for the file in a specific hierarchy of locations:  The active directory of the current drive (called the working directory). If you are in the directory C:\DOS, and you type in the name FOOBAR.EXE, DOS will logically enough look in C:\DOS for such a file. If DOS finds this file, it will run it.

39 THE PATH  If DOS does not find this file, it will consult something called the PATH. This is a list of directories that DOS has been instructed to check whenever it cannot find a file in the current active directory

40 THE PATH  You can see what the path is for your computer at any time by using the PATH command. Just type "path" at the DOS prompt, and you will get back your path. Here is what I got on one of my machines: C:\>path

41 THE PATH  that is set in the AUTOEXEC.BAT. This is a batch file that automatically executes (hence the name) when you boot your computer.  You can edit this file with the DOS program EDIT. To see or edit the contents of this file you need to enter the following command: C:\>edit autoexec.bat


Download ppt "FILES  A file is a collection of related information  Files are kept in directories on a disk."

Similar presentations


Ads by Google