Restore "change folder" dialog box
10 views (last 30 days)
Show older comments
Hi all
I really appreciated the "change folder" dialog box prompted at the run of a script or even at the starting of a debug session.
It helps you to change easily to the script path without having to track for it.
Well...few days ago it mysteriously disappeared.
If I run my script now from a folder different from the one where the script is located (and that is not included in the MATLAB path) I simply receive the error due to the mismatch of current path and script path.
Do you have any idea of what can be happened?
My MATLAB version is R2013a.
Thank you in advance
Simone
3 Comments
Preetham Manjunatha
on 21 Apr 2014
Edited: Preetham Manjunatha
on 21 Apr 2014
Simone,
Even I had the same problem when I installed the Matlab 2014a this morning. If your last installed Matlab version is showing the change folder dialog box then try to import the preferences from the older version if it exists in the C:\Users\UserName\AppData\Roaming\MathWorks\MATLAB\R2014a. Note this path may change accordingly, if so please use PREFDIR in Matlab command window. You can see a folder(s) called R2014a, R____a/b (your old versions if any), just copy and paste carefully to R2014a. Here carefully refers to the very old version to R2014a .pref file may not be compatible. If you are copying from, say R2013 or R2012 or R2011 a/b shall work. But anyways its up to your discretion. If you find particular line in .pref file which solves the issue, then please do post your solution. In anycase if you don't have older preferences folders, then you can get the older version preference folder from other computers where latest matlab is installed, make sure to change the path (its messy), but one solution. Lastly, the cause for this issue are: 1. You didn't saved the preferences, command history files from the old version while uninstalling it. Therefore is has completely removed the preferences from the local/roaming/Mathworks folder. In fact, this led to no preferences import for the new R2014a. 2. Even I rigorously checked the Matlab options/preferences for a check box or radio button with turning that dialog box on/off. Ended up in an unsuccessful attempt! Anyways if you find some other easy solution, please do post. I believe lot of them are having the same situation!
Attention: Mathworks, Matlab team, Please consider this bug.
Thank you,
Sean de Wolski
on 21 Apr 2014
Preetham, try running:
restoredefaultpath
rehash toolboxcache
Does it fix the issue? And I would not encourage manually copying preferences directories between releases. When you install a new release or clear the preferences directory, MATLAB will incorporate as much of the old preferences as possible.
Answers (2)
Azzi Abdelmalek
on 27 Mar 2014
Run this code
f='E:\matlab' % for example, your desired folder
cd(f)
2 Comments
Azzi Abdelmalek
on 27 Mar 2014
Try this
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
desktop.restoreLayout('Default')
See Also
Categories
Find more on Environment and Settings 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!