change simulink m file name issue

1 vue (au cours des 30 derniers jours)
wenchao zhang
wenchao zhang le 14 Juil 2023
Commenté : wenchao zhang le 14 Juil 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.

Réponse acceptée

Aman
Aman le 14 Juil 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!
  1 commentaire
wenchao zhang
wenchao zhang le 14 Juil 2023
thanks,Aman, yes that's go right.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by