xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DiskFormat()

Formats a floppy disk.

Syntax

DiskFormat( [<cDrive>]      , ;
            [<nCapacity>]   , ;
            [<cUDF>]        , ;
            [<cBootText>]   , ;
            [<nRepetitions>], ;
            [<cVolLabel>]   , ;
            [<lBoot>]       , ;
            [<lQuickFormat>]  ) --> nErrorCode

Arguments

<cDrive>
This parameter specifies the floppy drive to use. It can be either an upper case A or B, indicating the drive letter. The default value is A.
<nCapacity>
An optional numeric value specifying the capacity of the floppy disk. It defaults to 0. Valid values are 160, 180, 320, 360, 640, 720, 1200, 1440 and 2880.
<cUDF>
This parameter exists for compatibility reasons but is ignored.
<cBootText>
This parameter exists for compatibility reasons but is ignored.
<nRepetitions>
This parameter exists for compatibility reasons but is ignored.
<cVolLabel>
An optional character string of max. 11 characters can be specified for the volume label of the floppy disk.
<lBoot>
This parameter exists for compatibility reasons but is ignored.
<lQuickFormat>
This parameter defaults to .F. (false). When set to .T. (true) the floppy disk is formatted in "quick format" mode.

Return

The function returns a DosError() compatible error code as a numeric value. When the floppy disk is successfully formatted, the error code is zero.

Info

See also:DiskReady(), DosError(), DriveType(), FloppyType()
Category: CT:DiskUtil , Disks and Drives
Source:ct\diskutil.prg
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe