filenames - Batch Change File Names in Matlab -


I have 200 JPEG images which are counted from 1200 to 1399. How do I change their names? 1200.jpg - 1400.jpg to 1.jpg - 200.jpg , While keeping the original order of image names?

This is a problem that can be resolved more efficiently in bish or other shell scripting languages. Perhaps, this can be solved only through a single shell, Find .

Still, matlab can do a job too.

Consider this.

  list = dir ('. / Stack * .png'); % # Believes that file names like stack1200.jpg offset = -1200; #% Offset amount for number idx = 1: Length (list)% # We name = list of each file name (idx) .name; Number = sscanf (name, 'stack% f.png', 1); % # We transmit the number (name, ['stack' num2str (number + offset) '.png']); % # We rename the file. End    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -