I wrote some code, it's a little longer then I expected, basically I just want to but it somewhere so that I can call it from different notebook where the results would be output. I know I can write a package, but then I would need to reshuffle my code. I don't want to mess with it anymore, it works now. Thanks.
Not sure I can help much further without being on the computer. But you can skip the SetDirectory and just use the full file path.
SetDirectory[ FileNameJoin[{"C:", "Users", "Bart", "Google Drive", "X-Ray"}]]
I am sure I set it up correctly , it opens the package in that folder.
You can use the full file path.
If you use SetDirectory[] you need to set the directory to the relevant directory. SetDirectory[] on its own set the directory to you home directory which is the same as $HomeDirectory.
Thanks, but the command doesn't seem to find the notebook: I used SetDirectory[] and then NotebookEvaluate["Motofit test.nb", InsertResults -> True] with the correct name and the file is in that folder, however it didn't find it. Why?
Look into NotebookEvaluate:
http://reference.wolfram.com/language/ref/NotebookEvaluate.html