FilePrint["file"]
prints out the raw textual contents of file.
FilePrint["file",n]
prints out the first n raw textual lines of file.
FilePrint["file",-n]
prints out the last n raw textual lines of file.
FilePrint["file",m;;n]
prints out lines m through n of file.
FilePrint["file",m;;n;;s]
prints out lines m through n of file in steps of s.


FilePrint
FilePrint["file"]
prints out the raw textual contents of file.
FilePrint["file",n]
prints out the first n raw textual lines of file.
FilePrint["file",-n]
prints out the last n raw textual lines of file.
FilePrint["file",m;;n]
prints out lines m through n of file.
FilePrint["file",m;;n;;s]
prints out lines m through n of file in steps of s.
Examples
open all close allBasic Examples (3)
Scope (4)
Print every third line of a file:
Print out every other line of a file, from end to start:
Print a File object:
Tech Notes
Related Guides
History
Introduced in 2007 (6.0) | Updated in 2014 (10.0) ▪ 2016 (11.0) ▪ 2017 (11.1)
Text
Wolfram Research (2007), FilePrint, Wolfram Language function, https://reference.wolfram.com/language/ref/FilePrint.html (updated 2017).
CMS
Wolfram Language. 2007. "FilePrint." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/FilePrint.html.
APA
Wolfram Language. (2007). FilePrint. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FilePrint.html
BibTeX
@misc{reference.wolfram_2025_fileprint, author="Wolfram Research", title="{FilePrint}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/FilePrint.html}", note=[Accessed: 10-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_fileprint, organization={Wolfram Research}, title={FilePrint}, year={2017}, url={https://reference.wolfram.com/language/ref/FilePrint.html}, note=[Accessed: 10-August-2025]}