Is there a way to browse parent folders of the current working folder?
Mostrar comentarios más antiguos
I'm currently working on a project where I've separated the code into two folders which handle two conceptually related but functionally separate sets of tasks. If I sit at a parent folder of the two and add their folders to the path, I can easily view, edit, and run both sets of code at the same time, which is excellent for my workflow.
However, I'm running into issues related to running test cases on my code. I've been navigating to the folder where I want to dump the output and running a script, which works reasonably well and allows me to easily track the effects of changes to my code without needing to rewrite the test set. However, when I'm doing this, I'm effectively blind to all of my code, since all the browser shows me is the contents of the output folder.
Obviously, I can just keep the code open, or I can use the Open interface to navigate to the file that I want. Ideally, though, I'd like to flag a selected folder as the current working folder without collapsing the Current Folder browser onto it, letting me keep my setup there intact regardless of what I'm doing. Is there a way to do this?
Respuesta aceptada
Más respuestas (1)
Hamoon
el 11 de Sept. de 2015
I'm not sure if I got your question correctly, but have you tried cd?
doc cd
you can change your current folder whenever you want inside your code and make changes there and go to another folder by
cd(newFolder)
is this what you want?
2 comentarios
Josh Kirby
el 12 de Sept. de 2015
Hamoon
el 12 de Sept. de 2015
Actually Matlab does NOT change GUI view of the current folder when a code is running, that's a little bit tricky, you can start with the folder you want to see (suppose folder b) and in your code use "cd" to navigate to another folder (matlab does NOT show you this folder when your code is running, so you still see folder b), and in the end of your code again comeback to the folder b, so Matlab always will show you folder b. Isn't that what you want?
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!