I'm running a compiled script that throws an error at
mkdir(x)
where x is the name of some path. The error is "Maximum path length exceeded".
I try running the exact same line in the command window, and it works just fine.
Any ideas as to what's going on?
Thanks.

댓글 수: 3

Image Analyst
Image Analyst 2014년 8월 31일
As he said below, his problem was that "x" was his entire search path , not just one folder, though "Long path tool" may be useful in some other situations. Where can someone get more info on it?
K E
K E 2015년 10월 13일
Can someone point to where "Long path tool" can be found? I don't see it in the file exchange.
Walter Roberson
Walter Roberson 2015년 10월 13일
The references to "long path tool" were spam :(

댓글을 달려면 로그인하십시오.

 채택된 답변

Image Analyst
Image Analyst 2014년 7월 31일
편집: Image Analyst 2014년 7월 31일

3 개 추천

There is a limit to how long directory names can be, like 256 characters or something. What operating system are you using? What is length(x)? If you're making the folder a subfolder of the "current folder" it may be too long because a compiled app really runs out of some secret hidden folder that is really long. Put this in your script just before mkdir and see what it spits out to the console window:
pwd
fprintf('Length of %s = %d', x, length(x));

댓글 수: 1

Kevin
Kevin 2014년 7월 31일
This is just what I needed. In x I had somehow included the variable 'path', which put my entire search path in the directory name. Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

질문:

2014년 7월 31일

댓글:

2015년 10월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by