4.1.1. File and its specification

 Idi na Hrvatsku Stranicu  Back  MS-DOS OS  Next


Meaningful set of binary records on disk or other medium, is called FILE. In the MS-DOS operating system is identified by the NAME and TYPE addition, separated by a period. Settle into one of the directories on a device. So that you may know where it is located, needs to know the device, a directory on the device name and file type. Based on this file specifications in the MS-DOS system is:

 File Specification
Figure 4.1.3 File Specification (FS).

The meaning of the elements of the specification:

 DRIVE:   Device like DISK, indicated by a single letter
          [A:] to [Z:] where the file is located. Prepared to
          accept data. Called a volume, which can be assigned
          a name a maximum of 11 characters.
          Only one volume can have a BOOT active (A) properties.
 Partition:  Drive is divided into partitions, more volume.
             If the entire disk only one partition, one volume,
             then it automatically becomes BOOT in a format
             (for data preparation).
             The disc can be divided into a maximum of 4 primary
             partitions (options of BIOS) of which only one can
             have a BOOT properties referred as active (A).
             Any primary partitions, but active, can be divided
             to a logical partition, which is nothing more
             than an extension list partitions.
             Number of logical partitions is limited by the number
             of available free letters alphabet, of course without
             us inherent graphemes.
             NOTICE: The operating system recognizes
                     the partition as drive.
 \directory\   Directory with subdirectories that indicates a path
               to change where the file is located (directory N).
               Separating directory done by using a ' \ '.
               Newer operating systems use this term
               a name 'map' or 'folder'.
 NAME   File name, usually is given by associated with its
        content or task. In MS-DOS must have at most 8 (eight)
        letter or digit. Does not recommend to use
        a local graphemes state.
 .   Character that separates the name and type of file.
 TYPE   Addition to the name, which is called the separating
        point and specifying the purpose of the file.
        Must have 3 (three) character limit for the use
        of local graphemes state.

It should be noted that the specification of the file contains characters ' :  \ . ' That can not be used in the name and type of file or device name. Also can not use local graphemes of state. In addition to these operating system uses even some other characters (such as '  / ? * ~  '), and is a general recommendation that for any names use only letters and numbers in the group of the first 128 characters of ASCII code. Total length specification does not exceed 255 characters. Spaces in the name of files and directories are not allowed.


Example I

The most important types of files in the MS-DOS operating system are:

PROGRAM FILES - contain executable binary code and perform some task as a game. They have one of the following tag types:

 .COM or .EXE

 Only the above types of files can be run directly the OS,
 so that the typed their name (no and type) and pressed <ENTER>.

COMMAND FILE (BATCH) - contain a list of commands designed and OS commands that are executed in a sequence according to the census. They have the type designation:

 .BAT

SYSTEM FILES - contain information about DCS and resources based on their content is configured DCS. They have the identification of type

 .SYS

DEVICE DRIVERS and PROGRAMMING TOOLS - include information on the characteristics of the device to which the data refer. Usually the type

 .DLL or .PRD or the other depending on the purpose.

INITIALIZATION and CONFIGURATION FILES - contain information necessary to start the program or group of applications, and are usually of type

 .INI or .CFG and without more experience do not modify the content.

TEMPORARY FILES - created as a product of incomplete or aborted work with any application. Usually the type

 .TMP

 They should be periodically deleted from the disk because
 unnecessary occupy disk space. It is useful to designate
 special directory where they will be kept OS.

OTHER - files by type, which is associated with the content or programming tool with which they are made, as

 .BAK .OLD .TXT .DOC .DBF .BMP .WKS .HLP .OVL

 Signify a backup file to work, the old version
 files, text files, Word documents, file database,
 graphics, spreadsheet, descriptions of assistance,
 file messaging and more.

Furthermore, in the syntax of commands and command tag #FS involves listing all framed specification elements of file.

As noted above, some of the files the user does not see, because their assigned properties (ATTRIBUTE) to be HIDDEN. In addition to the above attributes can have read-only properties (RO), a mark of belonging SYSTEM or property ARCHIVE that allows creating invisible backing up files.

The file attributes are set with ATTRIB command and the list of attributes that they want to ask, according to the syntax:

 ATTRIB_[+H|-H][+S|-S][+R|-R]+[+A|-A]_#FS                                  (Ext)
 _[/S]

Mark ' + ' means that the attribute is assigned, and ' - ' to be deleted, which means that the ' + ' and ' - ' can not be used simultaneously with the same attribute. The ' /S ' provides an overview of all files and their attributes in the directory in which the current OS and all other directories.


Examples:


 ATTRIB_-H_MSDOS.SYS   Cancels the specified attribute
                       concealment the file.
 ATTRIB_+A_C:\DOS\TREE.COM   Gives the file TREE.COM
                             directory DOS archive attribute.
 ATTRIB_/S_|MORE   Provides a controlled view of all files
                   and their associated attributes.

ATTRIB command can also be used to protect the directory.

It is very important that the PATH command determines which OS directories provide uninterrupted use of their content regardless of where the OS is currently located. The command is usually located within the AUTOEXEC.BAT file, which contains a set of commands that COMMAND.COM executes immediately after the establishment of the system if you find the file specified.


Example II

Content of the starting configuration and system files AUTOEXEC.BAT and CONFIG.SYS.

 @ECHO OFF
 REM
 REM --------------------------
 REM       autoexec.bat
 REM --------------------------
 REM
 SET TMP=C:\TEMP	
 SET TEMP=C:\TEMP
 PROMPT $p$g
 PATH C:\BAT;C:\DOS;C:\MOUSE;C:\TOOLS
 PATH %PATH%;C:\WINDOWS;C:\WORK
 DOSKEY
 MOUSE
 mode con cp prep=((850 852) c:\dos\ega.cpi)
 mode con cp prep=((850) c:\dos\cro_ega.cpi)
 chcp 852
 keyb yu,,c:\dos\keyboard.sys
 CLS
 VER
	
		
 device=c:\dos\himem.sys
 device=c:\dos\emm386.exe RAM
 REM
 REM --------------------------
 REM        config.sys
 REM --------------------------
 REM
 buffers=16,0
 files=100
 dos=UMB
 lastdrive=Z
 FCBS=16,0
 dos=HIGH
 country=038,, c:\dos\country.sys
 install=c:\dos\nlsfunc.exe
 devicehigh=c:\dos\display.sys CON=(EGA,437,2)

PATH command, written in two rows, where the content is compiled in the execution sequence is determined that constant access enabled WINDOWS program group, external commands and operating system commands in the DOS directory, extra tools and programs in the TOOLS directory, but not the directories NC (Norton Commander) NU (Norton Utility) within the TOOLS directory, and working directory WORK no matter where the OS is currently active. According to the syntax it is possible to define multiple lines as in the example.

Commands in the starting file sequence: enable: off displaying text commands on the screen, set the cursor shape, determining a permanent road access, specify the directory for storing temporary files (files of type TMP), the simple control to monitor used OS commands and choouse them by vertical keyboard arrows to re-activate or change, call the program to control the mouse and delete the screen and display the version of the OS.

The first four commands are embedded, DOSKEY the directory [C:\DOS], part of the external operating system commands and can be activated without specifying the drive and directory for her approach with previous PATH permanently enabled. MOUSE.COM the file to communicate with the mouse in the directory [MOUSE].

When the directory [C:\DOS] and [C:\MOUSE] would not be in the PATH should not file DOSKEY and MOUSE be activated as in the example, it should specify the full path to them ( [C:\DOS\DOSKEY.COM] i [C:\MOUSE\MOUSE.COM] ). Because the executable file is not necessary to specify their type, it is enough to write just the filename.

BAT directory usually contains calls for the execution of utilities as NC or NU, or contains a series of commands that are executed in a sequence. Such a sequence of commands is called a command procedure or 'batch'. Usually placed first in the list of routes, and it shall be given priority in executing commands and procedures in it, regardless of whether there is still a corresponding command. In this way it is possible to reconfigure the way behavior of other programs when they call asking for them to change their initial default settings. In [BAT] directory may contain files for quick change according to the layout of the keys on the keyboard as shown on the screen, for example, called 'USA.BAT', 'CRO.BAT' and 'HR.BAT' that include the following:

       mode con cp select=437 (contents of the file USA.BAT)
       mode con cp select=850 (contents of the file CRO.BAT)
       mode con cp select=852 (contents of the file HR.BAT)

Commands 'MODE' and 'CHCP', although they are written in small letters will be carried out, because DOS does not distinguish between small and capital letters are used for quick selection table using the code that will show our characters on the screen in accordance with the available schedule characters on the keyboard. Specifically, some keyboards have drawn characters in different colors to make it easier to discern certain standards labeling keys. File 'CRO_EGA.CPI' modified the file 'EGA.CPI' and contains data to plot local graphemes which should be developed in such a way to fill empty seats in the 850 code table. In line showing us specific grapheme to coordinate schedules characters on your keyboard (command KEYB) and allow them reading the associated configuration settings that are set in the last three lines of the configuration file. 'NLSFUNC.EXE' file should be activated in the system to allow you to work with multiple code pages. Working with only one code page does not require that the 'NLSFUNC.EXE' active files and configuration files and starting the example can be modified according to the Windows 98 system.


 Back
 Search
 Next

Citing of this page:
Radic, Drago. " Informatics Alphabet " Split-Croatia.
{Date of access}; https://informatics.buzdo.com/file.
Copyright © by Drago Radic. All rights reserved. | Disclaimer
 Content - Home
 Content  Informatics Alphabet