Filter löschen
Filter löschen

how can I open the folder from desktop using matlab code?

99 Ansichten (letzte 30 Tage)
varsha
varsha am 30 Sep. 2013
Beantwortet: Ryan Chester am 12 Jan. 2018
I am doing a project in that i have to open the folder using Matlab code. how can I open the folder from desktop using matlab code?
  1 Kommentar
Jan
Jan am 30 Sep. 2013
It depends on what "open" and "the folder from desktop" exactly means here. Both terms could mean a variety of different things, so please add more information by appending it to the original question by editing. I've seen too many important information hidden in comments or pseudo-answers, where the readers do not expect it.

Melden Sie sich an, um zu kommentieren.

Antworten (3)

Image Analyst
Image Analyst am 30 Sep. 2013
Bearbeitet: Image Analyst am 30 Sep. 2013
If you're using windows, you can do
winopen(folderName);
where folderName is a string, for example 'D:\MyData'. It will bring up Windows Explorer open to the folder that you specified.

Ryan Chester
Ryan Chester am 12 Jan. 2018
This will give you the path to the desktop folder, and open it so you can select a file from it.
desktop=winqueryreg('HKEY_CURRENT_USER', 'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'Desktop');
[FileName,PathName,FilterIndex] = uigetfile({'*'},'Here, the desktop is "open"',desktop);

Simon
Simon am 30 Sep. 2013
Hi!
You get the users directory in Windows with
[~, userdir] = system('echo %USERPROFILE%')
The desktop folder is in this folder.

Kategorien

Mehr zu Desktop finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by