FileSize

FileSize[file]

gives the size of a file as a quantity.

Details

  • FileSize returns a Quantity object.
  • FileSize uses units of bytes, kilobytes, megabytes, etc. to give a conveniently readable representation of the file size.
  • The file in FileSize can be specified by giving the path to the file as a string or a File object.
  • FileSize also works with cloud objects.

Examples

open allclose all

Basic Examples  (1)

Get the size of a file:

In[1]:=
Click for copyable input
Out[1]=

Scope  (2)

Generalizations & Extensions  (1)

Applications  (1)

Properties & Relations  (1)

See Also

FileByteCount  FileDate  FileSystemMap  ByteCount

Introduced in 2017
(11.2)