Get
✖
Get
Details and Options


- If name is the name of a Wolfram Language context, ending with a ` context mark character, then Get will process this name to find the file to read.
- For a name of the form "context`", Get will by default search for the following files:
-
context.mx file in DumpSave format context.mx/$SystemID/context.mx file in DumpSave format for your computer system context.wl file in the Wolfram Language source format context/Kernel/init.wl kernel initialization file for a particular directory context/init.wl general initialization file for a particular directory context.m file in the Wolfram Language source format context/Kernel/init.m kernel initialization file for a particular directory context/init.m general initialization file for a particular directory - For a name of the form "context`subcontext`", Get will by default search for "subcontext`" inside a directory named "context".
- If name is the name of a file, any extension must be included explicitly.
- <<"name" is equivalent to <<name. The double quotes can be omitted if the name contains only alphanumeric characters and the characters `, /, ., ∖, !, -, _, :, $, *, ~, and ?, as described in greater detail in "Operator Input Forms".
- The following options can be given:
-
CharacterEncoding $CharacterEncoding what raw character encoding to use Method Automatic method to use for reading streams Path $Path directories in which to search for the given file - Syntax errors in Wolfram Language input files are reported in the standard form: filename: line: syntax error in expr. Get continues attempting to read a file even after a syntax error has been detected. However, if an error is detected, $Context and $ContextPath are reset to the values they had when Get was called.
- Get can read .nb notebook files, returning the low-level box constructs that represent them.
- Get[CloudObject[…]] can be used to get files from the cloud.
- Get[LocalObject[…]] can be used to get files from local persistent storage.
- Get[Databin[…]] gets the contents of a databin in the Wolfram Data Drop.
- When operating on a local file, the global variables $Input and $InputFileName are set to the file name and the full path of the file being read, respectively, during the execution of Get.
- With the Method option, the stream is opened using the given input stream method. This overrides the default way that Get resolves file names. The value of the method option can be any member of $InputStreamMethods.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases

https://wolfram.com/xid/02cuy-lb5ekq
This has set up definitions for several symbols in the EquationTrekker` context:

https://wolfram.com/xid/02cuy-kw9u6q

Get Wolfram Language input from a file:

https://wolfram.com/xid/02cuy-bztvh9

https://wolfram.com/xid/02cuy-b4y4va


https://wolfram.com/xid/02cuy-df5rza

Scope (2)Survey of the scope of standard use cases
Local objects can be used with Put and Get to store expressions persistently:

https://wolfram.com/xid/02cuy-3g94j


https://wolfram.com/xid/02cuy-djmveh

Cloud objects can be used with Put and Get to store expressions in the cloud:

https://wolfram.com/xid/02cuy-vqh2on


https://wolfram.com/xid/02cuy-rvo75y

Options (3)Common values & functionality for each option
CharacterEncoding (1)
Create a package in the encoding "ISO8859-7":

https://wolfram.com/xid/02cuy-ck89wc
Read the package back in the same encoding:

https://wolfram.com/xid/02cuy-50lv4r

By default, the value of $CharacterEncoding is used, which may produce errors and different results:

https://wolfram.com/xid/02cuy-dra7tu






https://wolfram.com/xid/02cuy-eci7x
Method (1)
Force the first argument to be interpreted as a string containing a package:

https://wolfram.com/xid/02cuy-vr2z44

With the default setting of Automatic, it would be interpreted as a file name:

https://wolfram.com/xid/02cuy-m3s3qi


Path (1)
By default, all directories on $Path are consulted when searching for a file:

https://wolfram.com/xid/02cuy-0dj8mq

Force only the current directory to be searched:

https://wolfram.com/xid/02cuy-65xf4b


Properties & Relations (2)Properties of the function, and connections to other functions
FindFile["context`"] gives that file that Get["context`"] would load:

https://wolfram.com/xid/02cuy-1vcqfr


https://wolfram.com/xid/02cuy-2fu4y2
Verify that the EquationTrekker package was indeed loaded:

https://wolfram.com/xid/02cuy-6ltw65

Ensure that an initialization file is read only once:

https://wolfram.com/xid/02cuy-f30dkf
Possible Issues (1)Common pitfalls and unexpected behavior
The form <<name treats name as a literal file name, not an expression to be evaluated:

https://wolfram.com/xid/02cuy-h59z1z

This looks for a file called "package", not for the file whose name is in the variable package:

https://wolfram.com/xid/02cuy-8w0cxz


Use the form Get[name] to load the file whose name is stored in the variable package:

https://wolfram.com/xid/02cuy-7jkylt
Wolfram Research (1988), Get, Wolfram Language function, https://reference.wolfram.com/language/ref/Get.html (updated 2019).
Text
Wolfram Research (1988), Get, Wolfram Language function, https://reference.wolfram.com/language/ref/Get.html (updated 2019).
Wolfram Research (1988), Get, Wolfram Language function, https://reference.wolfram.com/language/ref/Get.html (updated 2019).
CMS
Wolfram Language. 1988. "Get." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Get.html.
Wolfram Language. 1988. "Get." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Get.html.
APA
Wolfram Language. (1988). Get. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Get.html
Wolfram Language. (1988). Get. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Get.html
BibTeX
@misc{reference.wolfram_2025_get, author="Wolfram Research", title="{Get}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Get.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_get, organization={Wolfram Research}, title={Get}, year={2019}, url={https://reference.wolfram.com/language/ref/Get.html}, note=[Accessed: 16-April-2025
]}