The problem is that launching File Explorer from an administrative shell doesn't elevate File Explorer as it can only run with user-level permissions. The only way that I could find around this is to use a 3rd party file manager that can run with administrative permissions. In that case, double-clicking and drag-and-drop work as expected. It isn't an ideal solution, but it is the best that I could find.
Unable to Open Matlab Files from File Explorer Into Current Session via Double-Click or Drag and Drop
22 次查看(过去 30 天)
显示 更早的评论
Here is my version info:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1525091/image.png)
I found a reference to a similar issue here: https://www.mathworks.com/matlabcentral/answers/1805815-why-am-i-unable-to-open-a-script-function-by-drag-and-dropping-it-into-matlab-editor. However, I tried the solution of using an Administrative prompt and launched File Explorer and Matlab from the same shell, and it still does not work. You can see the method here, but the "no entry" symbol doesn't appear in the screenshot for some reason:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1525096/image.png)
The other reference that I found at https://www.mathworks.com/matlabcentral/answers/231791-problems-with-drag-and-drop posed a similar issue with elevation of Matlab in the shortcut, but I didn't find that issue here, which makes sense based upon the above result.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1525101/image.png)
It's unclear to me if this is a Matlab, Windows, or local IT issue, but I've asked local IT to take a look and they don't believe that anything has changed especially since the admin shell suggestion didn't work. Also note that this is pervasive to users around me who are mostly (all?) using R2023a.
Please let me know if there are any suggestions or idea for how to fix this or what might be causing it.
0 个评论
采纳的回答
更多回答(1 个)
Prateekshya
2023-11-6
Hi Shawn,
As per my understanding you are unable to open the .m files with double click or drag and drop even after launching MATLAB with administrative privileges.
Firstly, you should set the default program as MATLAB to open the .m or .mlx files. If this does not resolve the issue, there can be an issue with the installation of MATLAB. Consider reinstalling MATLAB for which you can refer this link: https://in.mathworks.com/help/install/ug/install-products-with-internet-connection.html
I hope it helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!