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?

 採用された回答

Kaustubha Govind
Kaustubha Govind 2011 年 6 月 24 日

0 投票

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 件のコメント

David O'Hara
David O'Hara 2011 年 6 月 24 日
Thanks. We'll give this a try. Client also said setting current directory to C:\ did the trick.

サインインしてコメントする。

その他の回答 (1 件)

David O'Hara
David O'Hara 2011 年 6 月 24 日

0 投票

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.

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by