change simulink m file name issue
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
wenchao zhang
am 14 Jul. 2023
Kommentiert: wenchao zhang
am 14 Jul. 2023
hi, i want use script to change the original name to new name, for example from VehicleSpeedLimiterDemand_cal.m ->vehiclespeedlimiterdemand_cal.m, how to do, thanks in advance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1433978/image.png)
0 Kommentare
Akzeptierte Antwort
Aman
am 14 Jul. 2023
Hi,
The reason for the error is that filesystems are generally case-insensitive. So, a workaround can be to first rename the file to another random name and then change it to a desired name.
originalName = 'VehicleSpeedLimiterDemand_cal.m';
newName = 'vehiclespeedlimiterdemand_cal.m';
movefile(originalName, 'some_other_name.m');
movefile('some_other_name.m',newName);
Hope this helps!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Search Path finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!