$Input

$Input

is a global variable whose value is the name of the stream from which input to the Wolfram Language is currently being sought.

Details

  • During the execution of <<file, $Input is set to "file".
  • During interactive input, $Input is "".

Examples

Basic Examples  (2)

Loading a file:

Click for copyable input

During interactive input, $Input is "":

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

See Also

$InputFileName  Get  Streams  DirectoryName  FileNameJoin  $BatchInput  $CurrentLink  $ParentLink  NotebookFileName

Tutorials

Introduced in 1991
(2.0)