4.5

4.5 | 2 ratings Rate this file 129 downloads (last 30 days) File Size: 22.86 KB File ID: #12180

FileSeries - Rename / renumber files, recursive directories

by Frederic Moisy

 

05 Sep 2006 (Updated 02 Sep 2009)

Code covered by BSD License  

Renaming and renumbering for series of files ; generalize the use of wildcards (*) for CD, LS ...

Download Now | Watch this File

File Information
Description

This directory contains some simple Matlab functions for recursive operations on files (wildcards on subdirectories allowed), and automatic renaming and renumbering for series of files. This may be useful for handling a large number of files:

   cdw - Change directory (like CD), allowing wildcard (*).
   lsw - List directory (like LS), allowing wildcard (*).
   rdir - Recursive list directory.
   rdelete - Delete files recursively.
   rrmdir - Delete directories recursively.
   renamefile - Rename a series of files.
   renumberfile - Re-number the indices of a series of files
   getfilenum - Get the index of a series of files.
   expandstr - Expand indexed strings (used by the other functions)

Examples:

   CDW mydir*/dir*12 works as CD, but wildcards (*) are allowed

   F = RDIR('set*/DSC*.*') returns all the files matching DSC*.* in all
   the directories matching set*.

   RENAMEFILE('DSC*.JPG','DSC','myphoto') renames the files 'DSC00001.JPG',
   'DSC00002.JPG',... as 'myphoto00001.JPG','myphoto00002.JPG',...

   RENUMBERFILE('DSC*.JPG','DSC') renumbers the *.JPG files as
   'DSC00001.JPG'...'DSC00100.JPG'.

   N = GETFILENUM('*.JPG','DSC') returns the indices of JPG-files.

See the help for each function for more examples.

MATLAB release MATLAB 7.5 (R2007b)
Zip File Content  
HTML Files cdw,
Contents,
expandstr,
getfilenum,
lsw,
rdelete,
rdir,
renamefile,
renumberfile,
rrmdir
Other Files
fileseries/_readmefirst_.txt,
fileseries/cdw.m,
fileseries/Contents.m,
fileseries/expandstr.m,
fileseries/getfilenum.m,
fileseries/lsw.m,
fileseries/rdelete.m,
fileseries/rdir.m,
fileseries/renamefile.m,
fileseries/renumberfile.m,
fileseries/rrmdir.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
07 Oct 2006 Yogesh Mehta

Great. Was useful for me.

30 Apr 2007 Jack Son

I like your work. It helps me to understand more about matlab.

Please login to add a comment or rating.
Updates
08 Sep 2006

code improved

08 Sep 2006

bugs fixed

02 Sep 2009

Version 1.40: New LSW, CDW. Some functions run much faster (thanks M. Tabarroki!)

Tag Activity for this File
Tag Applied By Date/Time
path Frederic Moisy 22 Oct 2008 08:37:34
directories Frederic Moisy 22 Oct 2008 08:37:34
files Frederic Moisy 22 Oct 2008 08:37:34
recursive directory rename renumber files Frederic Moisy 22 Oct 2008 08:37:34
directories Bradley Thomas 17 Dec 2008 03:06:09
files Bradley Thomas 17 Dec 2008 03:06:11
path Bradley Thomas 17 Dec 2008 03:06:11
recursive directory rename renumber files Bradley Thomas 17 Dec 2008 03:06:12
directories Pepe Sanchez 14 May 2009 10:03:18
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com