MATLAB: Cd desktop windows Vista/7

cddesktoppath

Hello everyone!
Let me ask a simple question which I dont know if is possible to do it easily.
Due to the fact that the path to desktop requires the name of the user:
c:\documents and settings\(username)\desktop
is there a fast or direct way to set or access using this "cd" command?
For example:
cd desktop
thanks!

Best Answer

Hi,
not really. What might help is something like this:
u = getenv('USERPROFILE');
cd(fullfile(u, 'Desktop'))
Titus