FileByteCount

FileByteCount[file]

gives the number of bytes in a file.

Details

  • The file in FileByteCount can be specified by giving the path to the file as a string or a File object.
  • If a particular file is moved from one computer system to another, the number of bytes in the file as reported by FileByteCount may change.
  • FileByteCount also works with cloud objects.

Examples

open allclose all

Basic Examples  (1)

The number of bytes in a file:

Scope  (1)

Get the number of bytes in the file specified by the File object:

Properties & Relations  (1)

FileSize gives the same number of bytes as FileByteCount:

Introduced in 1991
 (2.0)
 |
Updated in 2016
 (11.0)