Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>filesize</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  FILESIZE

  .  Summary

  filesize(str <filespec>);

  .  Description

  The filesize function returns the size in bytes of the specified
  file. <filespec> is the name of the file and may include a drive and
  directory portion, as well as the DOS wildcard characters * and ?.

  If <filespec> is blank (""), then the size of the last file found
  with the filefind function is returned. Note that calling filetime
  or fileattr in the meantime with a non-blank filename would instead
  make this call return the size of files found with those functions,
  as they use the same buffer.

  .  Return Value

  An integer value representing the size of the indicated file is re-
  turned, or a value of -1 is returned if the indicated file could not
  be found.

  .  Example

  str filespec[24] = "*.*", buf[12];
  int size;
  siz = filesize("TELIX.EXE");   // get size of file TELIX.EXE

  // Add up size of all files int he current directory
  siz = 0;
  while (filefind(filespec, 0, buf) != 0)   // until no more files
   {
    siz = siz + filesize("");   // get size of last filefound file
    filespec = "";              // make sure filespec is "" on sub-
                                // sequent calls to filefind to
                                // continue searching for files
   }

See Also: filefind filetime fileattr

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