MATLAB: Path with shortcut/link

addpathcddirpath

Does Matlab support shortcuts or symbolic links in paths. Example:
/lib_v1.1
/lib_v1.2
/current -> /lib_v1.2
The "current" is a shortcut to the latest version of the lib, but is displayed as current.lnk by the dir command
>> dir
. .. current.lnk lib_v1.1 lib_v1.2
It have no effect when adding the path
addpath(genpath('current'))
and will result in an error by cd
>> cd('current')
??? Error using ==> cd
Cannot CD to current (Name is nonexistent or not a directory).
>> cd('current.lnk')
??? Error using ==> cd
Cannot CD to current.lnk (Name is nonexistent or not a directory).
What are my options?

Best Answer

Is there any need to create links on the file system? I assume a software solution would be better:
Contents of the base folder:
/lib_v1.1
/lib_v1.2
Program for initializing the path;
current = 'lib_v1.2';
addpath(genpath(current))
Or you could you store the information in a text file:
Contents of the base folder:
/lib_v1.1
/lib_v1.2
/current_lib.txt -> contents: "lib_v1.2"
Program:
Current = fileread('current.txt');
% Perhaps: Current = strtrim(Current);
addpath(genpath(Current))