Normally you can switch to or load files from the parent folder by using the double period. This doesn't work when both the parent folder and current folder are in an external drive linked to with a directory junction.
I ran out of space so I moved my project to an external drive. This broke all my links so I made a directory junction to make it look like my project is still in the same folder it was previously in. When I am in a subfolder of my project I can no longer access the parent folder.
- I am in folder: F:\project_folder\sub_folder1\sub_folder2
- There is a directory junction so Matlab thinks it is in: C:\Users\UserName\Documents\project_folder\sub_folder1\sub_folder2
- The junction is at a higher level so C:\Users\UserName\Documents\project_folder -> F:\project_folder
- I want to cd to sub_folder1 which, of course, is also under the junction
in 2017b you get:
>> cd('..\')Error using cdCannot CD to ..\ (Name is nonexistent or not a directory).
So whats the best alternative way to get the parent folder without the absolute path?
Best Answer