Renaming the pdf format files

by

 

This program can rename the pdf format files for a large batch using the gui selection.

rename.m
clear all
clc
filename=uigetfile('*.pdf', 'MultiSelect', 'on');
for i=1:length(filename)
    oldname=filename{i};
    newname=['PR' filename{i}(1:3) '_' filename{i}(5:end)];
    [status,result]=system(['rename'  ' ' oldname  ' ' newname]);
    if status==0
        disp(['Rename ' oldname ' sucessfully!'])
    else
        disp([oldname ' Error!'])
    end
end
 

Contact us