FileByteCount[file]
gives the number of bytes in a file.


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 all close allScope (2)
Get the number of bytes in the file specified by the File object:
Get the number of bytes in a CloudObject:
Properties & Relations (1)
FileSize gives the same number of bytes as FileByteCount:
Tech Notes
Related Guides
History
Introduced in 1991 (2.0) | Updated in 2016 (11.0)
Text
Wolfram Research (1991), FileByteCount, Wolfram Language function, https://reference.wolfram.com/language/ref/FileByteCount.html (updated 2016).
CMS
Wolfram Language. 1991. "FileByteCount." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/FileByteCount.html.
APA
Wolfram Language. (1991). FileByteCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FileByteCount.html
BibTeX
@misc{reference.wolfram_2025_filebytecount, author="Wolfram Research", title="{FileByteCount}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/FileByteCount.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_filebytecount, organization={Wolfram Research}, title={FileByteCount}, year={2016}, url={https://reference.wolfram.com/language/ref/FileByteCount.html}, note=[Accessed: 11-August-2025]}