cd desktop windows Vista/7

1 visualización (últimos 30 días)
fjnb86
fjnb86 el 29 de Nov. de 2011
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!

Respuesta aceptada

Titus Edelhofer
Titus Edelhofer el 29 de Nov. de 2011
Hi,
not really. What might help is something like this:
u = getenv('USERPROFILE');
cd(fullfile(u, 'Desktop'))
Titus
  1 comentario
fjnb86
fjnb86 el 29 de Nov. de 2011
Thank you for your fast answer ;)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by