# My Get ( << ) doesn't work when path is in variable : why? [duplicate]

Take this code :

    nomFichier =
"C:\\Users\\Me\\Dropbox\\testFile.wdx";

<<  nomFichier;
<<  "C:\\Users\\Me\\Dropbox\\testFile.wdx";


The first line works whereas the second one doesn't : why ?

The error is :

Get::noopen: Cannot open nomFichier.


According to the documentation:

<<"name" is equivalent to <<name. The double quotes can be omitted if
the name is of the form specified in "Operator Input Forms".


So, << treats the literal expression as a file name.

Get[expression]


works, but the << form even ignores Evaluate.

• In fact I read it also but how to tell to mathematica use the value of the variable and not its name. Is it possible ? – StarBucK Jul 17 '17 at 23:02
• @StarBucK See edit. – John Doty Jul 17 '17 at 23:09