Cannot find an exact (case-sensitive) match??
이전 댓글 표시
I use Matlab2012b,and I want to use toolbox from power system analysis book.
I create a subdirectory, "power", where the MATLAB toolbox resides.I copy the book's toolbox files to c/program/matlab/r2010b/toolbox/power.
I open any file, but it occurs like the following error:
Cannot find an exact (case-sensitive) match for 'ChP1EX1.m'
The closest match is C:\Program Files\MATLAB\R2012b\toolbox\power\ChP1EX1.M
To change the file extension, cd to the file's folder, type: movefile ChP1EX1.M ChP1EX1.m_bad; movefile ChP1EX1.m_bad ChP1EX1.m and then cd back.
Can someone help me how to open the file correctly??
답변 (8개)
Walter Roberson
2013년 10월 8일
2 개 추천
cd to the file's folder, type: movefile ChP1EX1.M ChP1EX1.m_bad; movefile ChP1EX1.m_bad ChP1EX1.m and then cd back
just like it says on the box :-)
Or:
movefile('C:\Program Files\MATLAB\R2012b\toolbox\power\ChP1EX1.M', ...
'C:\Program Files\MATLAB\R2012b\toolbox\power\ChP1EX1.m');
Afterwards a rehash toolboxcache command might be required, when you really want to add files inside Matlab's root folder.
[EDITED] Windows is sometimes too dull to work as wanted. Perhaps an intermediate step is required:
movefile('C:\Program Files\MATLAB\R2012b\toolbox\power\ChP1EX1.M', ...
'C:\Program Files\MATLAB\R2012b\toolbox\power\ChP1EX1.m_');
movefile('C:\Program Files\MATLAB\R2012b\toolbox\power\ChP1EX1.m_', ...
'C:\Program Files\MATLAB\R2012b\toolbox\power\ChP1EX1.m');
댓글 수: 4
Walter Roberson
2013년 10월 8일
Yes, because MS Windows is internally not case sensitive, when it sees the .M being renamed to .m it thinks the names are the same. So you probably need to go through the extra step to change the "decorative" name of the file.
Walter Roberson
2018년 6월 22일
Correction: MS Windows is internally case sensitive, but by default NTFS is not.
kashif javed
2021년 1월 13일
Cannot find an exact (case-sensitive) match for 'barcycle.m'
The closest match is C:\Users\Kashif Javed\Downloads\Compressed\Matlab_tool_box\Matlab tool box\Folder 1\BARCYCLE.M
To change the file extension, cd to the file's folder, type:
movefile BARCYCLE.M BARCYCLE.m_bad; movefile BARCYCLE.m_bad BARCYCLE.m and then cd back.
please help me how to solve thiis error
Steven Lord
2021년 1월 13일
Follow the instructions in the error message.
To change the file extension, cd to the file's folder, type:
movefile BARCYCLE.M BARCYCLE.m_bad; movefile BARCYCLE.m_bad BARCYCLE.m and then cd back.
That will involve four commands:
- cd into the file's folder.
- movefile BARCYCLE.M BARCYCLE.m_bad;
- movefile BARCYCLE.m_bad BARCYCLE.m
- cd back to the folder you were in previously
haijun zhao
2016년 8월 31일
1 개 추천
把文件ChP1EX1.M后缀大写改为小写ChP1EX1.m即可
댓글 수: 4
Walter Roberson
2016년 9월 1일
Approximate translation:
ChP1EX1.M the file extension to uppercase to lowercase ChP1EX1.m
Walter Roberson
2016년 9월 1일
movefile('ChP1EX1.M ChP1EX1.m_');
movefile('ChP1EX1.m_ ChP1EX1.m');
xiaoxiao wang
2018년 6월 22일
very useful
kashif javed
2021년 1월 13일
Cannot find an exact (case-sensitive) match for 'barcycle.m'
The closest match is C:\Users\Kashif Javed\Downloads\Compressed\Matlab_tool_box\Matlab tool box\Folder 1\BARCYCLE.M
To change the file extension, cd to the file's folder, type:
movefile BARCYCLE.M BARCYCLE.m_bad; movefile BARCYCLE.m_bad BARCYCLE.m and then cd back.
please help me how to solve thiis error
CHIYUAN
2013년 10월 8일
0 개 추천
댓글 수: 1
Jan
2013년 10월 8일
The shown command cannot work: A quote and the complete destination is missing. Please post a copy of the code you use, otherwise we cannot guess, what you are exactly trying to do.
The error message sounds like the currently active user do not have write access to this folder. So either login with an admin account or let the admin modify the file access permissions for this folder. But when an admin is already active, ask him for changing the ".M" to ".m" manually, because this is most likely faster than running the renaming from Matlab.
CHIYUAN
2013년 10월 8일
0 개 추천
댓글 수: 2
Walter Roberson
2013년 10월 8일
You need to be administrator to do that.
You are probably using a newer version of Windows in which everything in \Program Files\ is protected against user modification.
Jan
2013년 10월 8일
@Walter: CHIYUAN wrote:
I create a subdirectory, "power", where the MATLAB toolbox resides.
It seems like admin privileges are used already. But this might be a bad idea.
CHIYUAN
2013년 10월 8일
0 개 추천
댓글 수: 1
Walter Roberson
2013년 10월 8일
You need to log in as administrator and rename the files as indicated above.
Muhammad Mohsin Aman
2016년 12월 11일
0 개 추천
Just download.. I have updated for you guys................
Jaime Francisco Chana Calderon
2020년 4월 11일
0 개 추천
Yo tambien estaba ensayando el codigo del profesor Hadi Saadat, y tenía el mismo problema de @CHIYUAN.
Lo solucioné de la siguiente manera. Abrí el archivo independiente, ejemplo "ZBUILD.M" y lo volví a guardar como "zbuild.m", luego de eso inicíe la función y le dí "movefile zbuild.M zbuild.m_bad; movefile zbuild.m_bad zbuild.m " en el Command Window. Luego volví a invocar la función y funcionó. Espero le sirva
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!