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

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 Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by