MATLAB Answers

Warning: Name is nonexistent or not a directory

1.090 views (last 30 days)
Jonathan
Jonathan on 3 Jul 2012
Commented: Steven Lord on 14 Jul 2021 at 16:49
Every time I start up MATLAB, I receive this message:
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\mexw32.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\special.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\sift.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\plotop.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\mser.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\misc.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\kmeans.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\imop.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\geometry.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\aib.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox.
Warning: Name is nonexistent or not a directory: xml_toolbox.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\Hand_Mathias\videoIO.
How do I fix this?
  10 Comments
Image Analyst
Image Analyst on 27 Apr 2021
@Simon Dawson, since you got an official crash report and MATLAB itself shutdown, it was a real crash and the Mathworks should be contacting you by email with some response.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 4 Jul 2012
Edited: Image Analyst on 21 Mar 2021
If there are some folders in the path you'd still like to keep on the path, and just remove the one folder that it is complaining about,
  1. Go to the "Home" tab of the tool ribbon,
  2. Click the SetPath icon.
  3. Then locate the missing folder(s) and highlight them.
  4. Click Remove, Save, and Close.
You should not see the missing folders listed the next time you start MATLAB.
If the above does not work, check your startup.m file by typing "edit startup.m" on the command line. If everything looks fine there (no addpaths with non-existent folders).
Finally, as a last resort, you can issue the line
restoredefaultpath
savepath
to get back to initial "right out of the box" conditions just as if you'd reinstalled MATLAB. This will remove any folders that you have added to the search path after you installed MATLAB and get you back to the original default path.
  7 Comments

Sign in to comment.

More Answers (8)

Srichakradhar Reddy Nagireddy
>> edit pathdef.m
  • Remove the directories that are causing the error.
  • Save the file and restart matlab, you will notice that you no longer have the error.
  14 Comments
Steven Lord
Steven Lord on 14 Jul 2021 at 16:49
Hassan Sultan flagged this as "The best answer"
Please use comments to offer opinions about the answer. Flags are generally intended to alert people with editing privileges of spam or other violations of the MATLAB Answers rules that need to be reviewed.

Sign in to comment.


JRMel
JRMel on 5 Mar 2015
Edited: JRMel on 5 Mar 2015
I am having a very similar problem. I get the error below every time I start matlab. I no longer have the crp toolbox. However, the problem paths are not listed when I go to File > Set Path or in pathdef.m
restoredefaultpath savepath --> This doesn't fix the problem
Here are the errors:
  2 Comments
JRMel
JRMel on 7 Mar 2015
Oh that actually helped me solve the problem! The startup file had a couple of addpath lines to those non-existing files. Thank you very much!

Sign in to comment.


Vicente
Vicente on 11 Sep 2015
I have a similar problem. When I first open MATLAB, I see those same warnings, name non existant or not a directory, but I know what's the cause. I have formatted my pc, and somehow Microsoft managed to change my computer User name from what it was previously. Now, I can't run any of my models. Can anyone help me with fixing this problem please?
  1 Comment
Walter Roberson
Walter Roberson on 11 Sep 2015
Vicente, consider making a shortcut or symbolic link for the old directory name to point to your current directory name.

Sign in to comment.


omid
omid on 6 Apr 2018
Go to File>set path> Defaults> save> close then restart matlab

Manoj Shukla
Manoj Shukla on 1 Apr 2020
Hi Team,
Please provide the solution for step by step
I am having a very similar problem. I get the error below every time I start matlab. I no longer have the crp toolbox. However, the problem paths are not listed when I go to File > Set Path or in pathdef.m
restoredefaultpath savepath --> This doesn't fix the problem
Here are the errors: Offline & Online
>> submit()
Warning: Name is nonexistent or not a directory: C:\Users\lenovo\MATLAB Drive\.\lib
> In path (line 109)
In addpath (line 86)
In submit (line 2)
Warning: Name is nonexistent or not a directory: C:\Users\lenovo\MATLAB Drive\.\lib\jsonlab
> In path (line 109)
In addpath (line 86)
In submitWithConfiguration (line 2)
In submit (line 45)
'parts' requires one of the following:
Automated Driving Toolbox
Navigation Toolbox
Robotics System Toolbox
Sensor Fusion and Tracking Toolbox
Error in submitWithConfiguration (line 4)
parts = parts(conf);
Error in submit (line 45)
submitWithConfiguration(conf);
Thanks & Regards,
Manoj Shukla
  2 Comments
Walter Roberson
Walter Roberson on 2 Apr 2020
The code for some of the functions for submitWithConfiguration has some lines in which parts is a function, and also has some lines in which parts is a variable. Recent changes in the way MATLAB finds functions and variables say that when you use a single name as a function and a variable in the same routine, that MATLAB is permitted to assume that the name only refers to a variable, and then to complain when the variable does not yet exist at the time that the name was intended to be a function call. You need to edit the code so that uses some other variable name rather than parts

Sign in to comment.


Alp utku iyidilli
Alp utku iyidilli on 3 Jan 2021
Warning: Name is nonexistent or not a directory: C:\Users\maila\AppData\Local\Temp\Editor_yviar
Is my error when I run Matlab. I can't understand what the problem is. And plus as I was trying to
cd ~/Desktop
mkdir CONN_Demo
To learn functional connectivity on CONN-Toolbox, I had another problem:
"Cannot CD to C:\Users\maila\Documents\~\Desktop (Name is nonexistent or not a directory)."
Could you tell me what I should do as a non-programmer user?
Thank you in advance...
  2 Comments

Sign in to comment.


Maneesa Mustharif TP
Maneesa Mustharif TP on 6 Jun 2021
Warning: Function Warning: Name is nonexistent or not a directory: /MATLAB Drive/./lib
> In path (line 109)
In addpath (line 86)
In addpath (line 49)
In submit (line 2)
Warning: Function Warning: Name is nonexistent or not a directory: /MATLAB Drive/./lib/jsonlab
> In path (line 109)
In addpath (line 86)
In addpath (line 49)
In submitWithConfiguration (line 2)
In submit (line 45)
'parts' requires one of the following:
Automated Driving Toolbox
Navigation Toolbox
Robotics System Toolbox
Sensor Fusion and Tracking Toolbox
UAV Toolbox
Error in submitWithConfiguration (line 4)
parts = parts(conf);
Error in submit (line 45)
submitWithConfiguration(conf);
i have this error when i tried to submit my assignment on matlab.
can you find solution for this?

Walter Roberson
Walter Roberson on 6 Jun 2021
You need to get corrected code from the courseware system; if corrected code is not available, then the responses at the above link describe how to modify the code yourself.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by