File Operations

In addition to a rich set of standard file operations, Mathematica's unified symbolic architecture makes it easy to apply algorithmic approaches and efficient higher-level programming to many file and system administration tasks.

ReferenceReference

FileNames list names of files or directories at any depth in the file system

CopyFile ▪ RenameFile ▪ DeleteFile

File Properties

FileDate ▪ FileByteCount ▪ SetFileDate ▪ FileType ▪ FileHash ▪ FileFormat

File Utilities

FindList search for strings in lists of files

Splice splice Mathematica results into a file

FilePrint display the raw contents of a file

Directory Operations »

DirectoryQ test whether a name corresponds to an existing directory

CreateDirectory ▪ CopyDirectory ▪ DeleteDirectory ▪ SetDirectory ▪ ...

Finding Files

FindFile find a file on $Path etc.

FileNameSetter interactively browse for a file

FileExistsQ ▪ AbsoluteFileName

File Name Operations »

FileNameSplit, FileNameJoin split, join file name strings

FileBaseName ▪ DirectoryName ▪ ExpandFileName ▪ ...

Reading & Writing Files »

Import ▪ Export ▪ Get(<<) ▪ Put(>>) ▪ ReadList ▪ BinaryReadList ▪ ...

Low-Level File Operations »

OpenRead ▪ OpenWrite ▪ Streams ▪ Read ▪ Skip ▪ ...

New to Mathematica? Find your learning path »
Have a question? Ask support »