renamefile(NAME, P1, P2) renames the files matching NAME, replacing
the substring P1 by P2. NAME may be a cell array of strings, and may
contain wildcards (*) and brackets (see expandstr). If P1 is present
several times in a filename, replaces only the last occurrence.
Examples:
renamefile('DSC*.JPG','DSC','myphoto')
renames the files 'DSC00001.JPG','DSC00002.JPG',... as
'myphoto00001.JPG','myphoto00002.JPG',...
renamefile('*/DSC*.JPG','DSC','myphoto')
does the same in all the directories containing JPG files.
renamefile('B[1:100,3]*.VEC','B','PIV') renames the files
'B001*.VEC' to 'B100*.VEC' as 'PIV001*.VEC' to 'PIV100*.VEC'
F. Moisy
Revision: 1.00, Date: 2005/10/04.
See Also
renumberfile, MOVEFILE, expandstr, rdir, getfilenum.