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

Illustration
Genesis - 2020-11-03T11:03:59+00:00
Question: How to change the name of the images from frame1.jpg , frame2. jpg to image1.jpg etc etc

 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 answered . 2025-11-20

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


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!