\\thispc\scripts and c:\scripts not the same?
Show older comments
I tried to set the path for my scripts folder "scripts" on the c: drive. However, my program using the scripts couldn't find the scripts, not until I set the path to the scripts folder through finding the pc on the network list. I mean why will matlab not be able to find the scripts path if it set using the good old c:-path? Why does it need to be wired through the network to the same pc to be able to find the folder?
Is
\\thispc\scripts
and
c:\scripts
not the same?
6 Comments
Jan
on 23 Feb 2018
The question is not clear. Of course you can simply include C:\scripts in your path, if this folder exists. Did you create a shared folder called "\\thispc\scripts"? If so, how did you do this? Why do you assume, that you cannot access C:\scripts?
Jan
on 23 Feb 2018
[MOVED, Mads wrote in the section for answers:]
The question is clear, but the reason it did not work is not clear.
The "scripts" folder was placed there, actually through a Github repository.
I see it on the c: drive where I put it and expect everything is fine.
So I set the matlab search path through the "Set path" GUI. It doesn't complain, and it saves it too.
Then I run my program which is supposed to read scripts from the "scripts" folder.
But the usual complain comes, that it did not find this and that.
By chance I get the idea to set the path through finding the present computer itself just by going through the Network lists, locating it, locating the folder.
It saves.
Now the program runs smoothly.
I agree, of course they should be the same
@Mads: Please post comments in the section for comments, not as an answer. Thanks.
Mads
on 23 Feb 2018
Jan
on 23 Feb 2018
At least to me the question is still not clear.
The "scripts" folder was placed there, actually through a Github
repository.
I do not know, what this means. You have a folder called C:\scripts, correct? Is it a real folder or a mapped network drive or link?
But the usual complain comes, that it did not find this and that.
Please post the code and a copy of the complete error message. There is a problem in any unknown detail, therefore we need to know all details.
This should work reliably:
addpath('C:\scritps', '-end');
savepath
I assume, you had another problem with your code.
Mads
on 23 Feb 2018
Jan
on 23 Feb 2018
Then I post it as an answer.
Answers (1)
Jan
on 23 Feb 2018
It is not clear, what went wrong, but this should work:
addpath('C:\scritps', '-end');
savepath
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!