Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought


     FORMAT(DOS)       UNIX System V        FORMAT(DOS)



     Name
          format - formats the disk in the specified drive  to  accept
          MS-DOS files


     Syntax
          format drive:[/1][/4][/8] [/n:xx][/t:yy][/v][/s]

          format drive:[/1][/b][/n:xx] [/t:yy]


     Description
          The format command initializes the directory  and  the  file
          allocation  tables  on a disk.  You must use this command to
          format all new disks before MS-DOS can use them.

          When using the commands, you must specify the drive that you
          want  to format. The format command then uses the drive type
          to determine the default format for a disk.

          When you format a hard disk, format prompts  you  to  verify
          the volume label:

               Enter current Volume Label for drive x:

          If your hard disk  does  not  have  a  volume  label,  press
          <Return>.  (Note: If your hard disk has never been formatted
          before, or if it has a bad  boot  sector,  format  will  not
          prompt you for a volume label.)

          If the volume label that you enter does not match the label
          on the hard disk, format displays the following message:

               Invalid Volume ID Format failure

          Otherwise, it continues:

               WARNING, ALL DATA ON NON-REMOVABLE DISK
               DRIVE x: WILL BE LOST!  Proceed with Format (Y/N)?_

          If you want to format your hard  disk,  enter  y.   If  not,
          enter n.

          The switches are:

          /l    Formats a disk for single-sided use, even if the  disk
                or  drive  is  double-sided.   If the drive is double-
                sided and you don't specify this switch, you won't  be
                able  to  use  the  formatted  disk  in a single-sided
                drive.

          /4    Formats a double-sided disk in  a  high-capacity  disk
                drive.  Note, however, that if you are using a single-
                or double-sided drive, you may not be able to reliably
                read disks formatted with this switch.

          /8    Formats a disk for 8 sectors per track.  If you do not
                specify this switch, format defaults to either 9 or 15
                sectors per track (depending  on  the  type  of  drive
                being used).  Note that format always creates either 9
                or 15 sectors per track; when you specify this switch,
                though,  it  tells  MS-DOS  to  use only 8 sectors per
                track.

          /b    Formats a disk with 8 sectors per track and  allocates
                space  for  the  hidden system files.  If you use this
                switch with the format  command,  you  can  place  any
                version  of MS-DOS on the disk by using that version's
                sys command.  If you don't use this /b switch, you can
                place  only  MS-DOS  3.2  on the disk by using the sys
                command.  You cannot use the /s or the /v switch  with
                the /b switch.

          /n:xx Specifies the number of sectors per track that  format
                uses to format a floppy disk.

          /t:yy Specifies the number of tracks that format places on a
                floppy disk.

          /v    Prompts  for  a  volume  label  after  the   disk   is
                formatted.  A volume label identifies the disk and can
                be up to 11 characters in length.   An  example  of  a
                volume label is PROGRAMS.

          /s    Must be the last switch that  you  type.  This  switch
                copies the operating system files from the disk in the
                default drive to the newly formatted disk.  The  files
                are copied in the following order:

                io.sys
                msdos.sys
                command.com

          If the operating system is not on the default drive,  format
          prompts you to insert a system disk in the default drive (or
          in drive A if the default drive is nonremovable).

          When formatting  is  complete,  format  displays  a  message
          showing the total disk space, any space marked as defective,
          the total space used by the operating system (when  you  use
          the /s switch), and the space available for your files.

          The following table shows which switches  you  can  use  for
          certain types of disks:

                    DISK TYPE        VALID SWITCHES
                    ________________________________________
                    160/180 Kbytes   /l /4 /8 /b /n /t /v /s

                    320/360 Kbytes   /1 /4 /8 /b /n /t /v /s
                    720 Kbytes       /n /t /v /s

                    1.2 Mbytes       /n /t /v /s
                    hard disk        /v /s

          You should not format disks on drives used in assign,  join,
          or subst, and you cannot format disks over a network.

          Exit codes

          The format command returns the following exit codes:

          0      Successful completion

          3      Terminated by user (<CTL>c)

          4      Fatal error (any error other than 0, 3, or 5)

          5      N response to hard disk prompt, ``Proceed with format
                 (Y/N)?''

          You can check these  exit  codes  by  using  the  errorlevel
          condition with the if batch processing command.


     Examples
          To format a floppy disk in drive A  and  put  the  operating
          system on it, enter the following:

               format a:/s

          And to format a floppy disk in drive A for  use  with  data,
          enter the following:

               format a: /v

          The /v switch causes format  to  prompt  you  for  a  volume
          label.   You  should  type  a  label  since it will help you
          identify the data that the disk contains.


     Notes
          Formatting destroys any previously existing data on  a  disk
          and  ignores  drive  assignments  created  with  the  assign
          command.

          format is an external command.


     FORMAT(DOS)          (printed 8/16/89)           FORMAT(DOS)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026