How can I get a non-UNC path with the tempfile function?

If I call the tempfile function on a Window PC I get an UNC path (starts with \\). I think this is because I am running a network version of MatLab. What do I have to do to get a regular DOS path (e.g. E:\)? Can I just map the LAN drive that I get?

 Respuesta aceptada

Kaustubha Govind
Kaustubha Govind el 24 de Jun. de 2011
You may need to map the directory to a drive as well as set your $TEMP environment variable accordingly (you will need to restart MATLAB to get updated environment variables).

1 comentario

Thanks. We'll give this a try. Client also said setting current directory to C:\ did the trick.

Iniciar sesión para comentar.

Más respuestas (1)

David O'Hara
David O'Hara el 24 de Jun. de 2011
I am thinking this may be the answer from the workaround section.
On a Windows® platform, you should not start a MATLAB session, from a Universal Naming Convention (UNC) path, such as \\mycompany\bigserver\matlab. You will see errors if you do this. UNC paths are not supported for matlabroot.
You can work around this by mapping a drive to the location.

Categorías

Más información sobre MATLAB en Centro de ayuda 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