Why do I get a warning "Name is nonexistent or not a directory" about the Editor_vxdxq folder?

146 views (last 30 days)
After installing R2020a PreRelease I get the following warning in the MATLAB Command Window on startup:
Warning: Name is nonexistent or not a directory: C:\Users\<my username>\AppData\Local\Temp\Editor_vxdxq
Additional notes:
1) This warning does not appear in MATLAB R2019a.
2) Furthermore, when I navigate to "C:\Users\username\AppData\Local\Temp\" I do not see the "Editor_vxdxq" folder when MATLAB R2020a is closed (or when R2019a is open). This file appears as soon as R2020a is open.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Feb 2021
Edited: MathWorks Support Team on 17 Feb 2021
The warning that you are seeing, as well as the automatic generation of the Editor_vxdxq folder is an expected behavior. Essentially, this folder gets automatically created in the background by the Live Editor in MATLAB. When we open MATLAB R2020a this file gets created, if we call the "savepath" command after this, the folder will be saved to the path but it might not exist in the future when the path is reloaded again (hence you see the warning). That being said, there is no concern with the warning itself as the generation of this folder is handled by MATLAB. We have two options to resolve the warning:
1) Remove the "Editor_vxdxq" folder from the path and save it:
  • Open MATLAB
  • Enter the following command in the MATLAB Command Window:
>> pathtool
  • Use the Set Path dialog box to remove Editor_vxdxq folder from the path and click "Save"
  • On the MATLAB Command Window, enter
>> savepath
After this you should not get the warning, and can ignore the generation of this file. Since this folder was meant to be temporary, removing it from the MATLAB path should not result in any unexpected side effects in the current MATLAB session. Should you need to save the search path again in the future, make sure to remove the temporary directory again if it appears before saving.
2) You can manually turn the warning off with the following command:
>> warning('off', 'MATLAB:mpath:nameNonexistentOrNotADirectory')
One thing to note is that we generally recommend against using the "savepath" command (unless advised by the MathWorks staff as part of a troubleshooting step) as it can have some serious consequences if an unintended file gets added to the path. To add additional items to the path, we recommend to instead use the "addpath()" command in the "startup.m" file. For more information, please see the following link:

Sign in to comment.

More Answers (3)

Albert Bing
Albert Bing on 17 Dec 2020
Edited: Albert Bing on 17 Dec 2020
Here is my solution.
In your startup.m file, add several lines as following
editors=regexpi(paths, 'C:[^;]*Editor_[^;]*', 'match');%search C:\Users\<name>\*\Editor_*
for i=1:numel(editors)
If you don't have or don't know the startup.m file, just create a startup.m file in C:\Users\<your-name>\Documents\MATLAB.
The idea is to find the Editor_* path, and remove it when MATLAB starts.
The regular expression could be more precise like C:\Users\<your-name>\AppData\Local\Temp\Editor_\w*(?=;)
  1 Comment
CD_778 on 25 Aug 2021
I follow you instructions but those lines are not executed in startup.m.
It's not clear for me why, this is my startup file:
editors=regexpi(paths, 'C:[^;]*Editor_[^;]*', 'match');%search C:\Users\<name>\*\Editor_*
for i=1:numel(editors)
disp('temp folder clear');
It seems that the script is executed only after the command "run('C:\Dati\Eltbox\polarion-Simulink/startup.m');"
Then, I also have noticed that gui "set path" on matlab interface displays different path from pathdef.m.
For this reason even if I remove tmp dir from path it still remain into file pathdef.m
Are there any other suggestions to remove tmp folder from pathef.m at matlab startup?

Sign in to comment.

Mark on 25 Apr 2020
I just started with MatLab today, a few minutes ago, so maybe this is not correct, but to deal with this problem in Linux I launched MatLab as the root (Administrator in Windows I suppose) user & deleted it from within the MatLab GUI's 'Set Path' menu bar option & saved it, then exited MatLab & restarted it as regular user. The warning went away.
  1 Comment
Image Analyst
Image Analyst on 6 Jul 2020
Mark, yes that is correct. In fact, it's the very same thing the Answer above told you to do. However, root or administrator privilege should not be required.

Sign in to comment.

Nathan Kando
Nathan Kando on 21 Sep 2020
Edited: Nathan Kando on 21 Sep 2020
I got this issue because in startup.m,
I used a combination of the commands:
• mfilename
• addpath
• savepath
for the startup file to add itself to the path permanently.
When I was testing startup.m,
I used CTRL+Enter to 'evaluate selection' rather than 'run'.
Evaluate selection runs the code from a temporary location;
thus mfilename provides the temporary path to addpath,
which then gets then saved by savepath,
so during the next session you'll see the warning
about the temp path being in the path listings.

Sign in to comment.


No tags entered yet.


Community Treasure Hunt

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

Start Hunting!

Translated by