How to change the name of the images from frame1.jpg , frame2. jpg to image1.jpg etc etc

G
Genesis · Nov 3, 2020 · 2K views
Question
 I would like to change the name of 100 images  from frame...jpg to image 1.jpg , image2.jpg etc etc.
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 25, 2026

Something like this

 

files = dir('*.jpg');
for i = 1:numel(files)
    old_name = files(i).name;
    new_name = strrep(old_name, 'frame', 'image');
    movefile(old_name, new_name)
end
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!