PIVMat Function Reference<< Prev | Next >> 
renamefile
Rename a series of files.

Description
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 rdir). 
 
renamefile(NAME, P1, P2, OPT), where OPT is 'dironly', 'fileonly' or 
'filedir', renames only the directory names, the file names, or both 
(by default), respectively. 
 
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' 
 
   renamefile('set*','set','newset','dironly') renames the directories 
   'set*' as 'newset*'. 
 
See Also
renumberfile, MOVEFILE, rdir, getfilenum. 
Published output in the Help browser 
   showdemo renamefile 
 

 Previous: remapfNext: renumberfile 

2005-2021 PIVMat Toolbox 4.20