# Running file with some extension [closed]

I want to run the Mathematica file with some extension, like '.m'. But, I don't know, how can I run the code. Please, guide me.

• Have a look at Get. – Henrik Schumacher Mar 17 at 12:25
• To keep it simple, pass the full path to the file to the Get function. That's all. – Szabolcs Mar 18 at 12:12
• what is ''Get''? There is no link. I can't open this. How can I pass the full path to the file? Can you help me Please? I have Mathematica 11.3 in my system. But, not able to run the code in file with extension ''.m''. – MMS Mar 18 at 13:26
• Actually, corresponding with OP and checking the *.m file, it is clear from the contents of the file that it is not generated by Mathematica, and is not of Wolfram syntax (hence the close vote). Perhaps the *.m file is from Matlab, as I recall its vector syntax being [v1, v2, ...] that complies with said file. – István Zachar Apr 5 at 16:38

If a file has the extension .m, then I assume you are trying to load a package into your notebook. This can be achieved by calling the package (say called PackageName.m) into your own notebook by doing the following:

1. You can type into your opening like <<PackageName, which uses the backtick symbol . It is probably at the left hand side of your keyboard.

2. Alternatively, this is a shortcut for the MMA function Get, given in the documentation here. The first example has the above notation I was talking about. Then Get["PackageName.m"] would work.

Here is a screenshot so you can see the backtick in action.

• Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example. – MMS Mar 17 at 14:13
• I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you. – Brad Mar 17 at 14:17
• It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer. – J. M. will be back soon Mar 17 at 14:23
• @J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM. – Brad Mar 17 at 14:24
• Screenshots aren't much use. If you have to, post your screenshot and more importantly, your code as an edit in your original post. – Brad Mar 18 at 18:25