cd desktop windows Vista/7

1 次查看(过去 30 天)
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!

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by