$InputFileName

$InputFileName
is a global variable whose value is the absolute file name of the input file from which input to the Wolfram Language is currently being sought.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Loading a file:

Click for copyable input

During interactive input, $InputFileName is :

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2010
(8.0)
Translate this page: