So i have a GUI, and this GUI generates me some Excel files and what i want to do is a button that will open explorer in the folder where i have those excel files created.Is this possible? i did read some answers on the forum but i did not get anything usefull :(, any clue?

 Respuesta aceptada

Walter Roberson
Walter Roberson el 9 de Mayo de 2016

0 votos

If you are using MS Windows then you can
winopen('explorer')
Is that what you want to do though? Or do you want to use
[filename, filepath] = uigetfile('Select a file');

3 comentarios

Carstea Ciprian
Carstea Ciprian el 9 de Mayo de 2016
So i want to open the explorer at the exact path of the file that i created.
Walter Roberson
Walter Roberson el 9 de Mayo de 2016
projectdir = 'C:\Users\Me\Documents\MyProject\'; %adjust as needed
Then try these:
cmd = sprintf('explorer "%s" &', projectdir);
system(cmd)
or
winopen(projectdir)
I think the second of those might be enough.
Image Analyst
Image Analyst el 9 de Mayo de 2016
Yes, the last code line is all you need.
winopen(projectdir) % projectdir is a variable with the folder name in it.
or
winopen('C:/whatever/foo/fubar/snafu'); % Folder is hard coded as a string literal.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB Report Generator en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 9 de Mayo de 2016

Comentada:

el 9 de Mayo de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by