Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_zapdisk() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_ZAPDISK()

 DESCRIPTION

 C_ZAPDISK() erases all files and directory entries from the
 specified drive so that the disk contains all available space.

 NOTES

 C_ZAPDISK() removes all files, in all directories regardless of the
 file's attribute.  All hidden, system, read-only, etc. files are
 deleted.

 Do not attempt to use this function on a hard disk.  C_ZAPDISK()
 will only work on removeable disk drives.  Use the C_ISREMOVE()
 function to be sure the specified drive is removeable.

 The drive should be checked with C_ISDRIVE() to be sure it is
 ready.  No attempt is made to check the status of the drive.

 SYNTAX

 C_ZAPDISK(drive)

 PARAMETERS

 drive (C) is the drive letter to check.  The drive letter can be
 any valid removeable drive and is specified as a character string
 ("A:", "B:", etc.).  The colon must be provided with the drive letter.

 RETURNS

 C_ZAPDISK() returns the number of files including directories that
 were deleted, zero (0) if no files were found, or -1 if the
 specified drive is invalid of non-removeable.

 EXAMPLES

 if c_isdrive("A:")
   if !c_diskempty("A:")
     ? "Diskette Contains Data - Deleting"
     c_zapdisk("A:")                          && erase all files
   else
     do copy_files
   endif
 endif


See Also: C_DISKEMPTY() C_ISREMOVE() C_ISDRIVE() C_ZAPDIR() C_ERASE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson