フィルターのクリア

Maximum Path Length Exceeded?

55 ビュー (過去 30 日間)
Kevin
Kevin 2014 年 7 月 31 日
コメント済み: Walter Roberson 2015 年 10 月 13 日
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 件のコメント
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 日
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 件)

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by