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?

 Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 24 Juin 2011

0 votes

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 commentaire

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

Connectez-vous pour commenter.

Plus de réponses (1)

David O'Hara
David O'Hara le 24 Juin 2011

0 votes

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.

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by