3.0

3.0 | 2 ratings Rate this file 7 Downloads (last 30 days) File Size: 6.04 KB File ID: #171

filehound

by Ronald Ouwerkerk

 

06 Mar 2001

The M script filehound.m recursively searches directories for files matching a file filter.

| Watch this File

File Information
Description

The M script filehound.m recursively searches directories for files matching a file filter (e.g. '*.m') and produces a list of type cell array with all pathnames for files that match the filter. It also produces a text file with the same information. This filename is chosen with the uiputfile utility.

The list could be used to examine the contents of each file:

  filelist = filehound;
  for i=1:length(filelist)
    fid = fopen(filelist{i}, 'r')
    A = fread(fid.....
    ......
  end

The directory names are filtered for spaces and quote characters to prevent errors in Unix environments.

Acknowledgements
This submission has inspired the following:
Improved file hounding
MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
06 Dec 2004 Tobias Höffken

This is the best tool for this purpose that I could find in the File Exchange. However I found that it was doing too many things (writing a report, recursively searching the subdirectories) that were not welcome and that I deactivated.

30 Sep 2008 haroon muhm

nice

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
path Ronald Ouwerkerk 22 Oct 2008 06:33:20
directories Ronald Ouwerkerk 22 Oct 2008 06:33:20
files Ronald Ouwerkerk 22 Oct 2008 06:33:20
file filter Ronald Ouwerkerk 22 Oct 2008 06:33:20
tools Ronald Ouwerkerk 22 Oct 2008 06:33:20
recursive Ronald Ouwerkerk 22 Oct 2008 06:33:20
utilities Ronald Ouwerkerk 22 Oct 2008 06:33:20
directories haroon 18 Feb 2011 08:02:43
file filter haroon 18 Feb 2011 08:02:46
files haroon 18 Feb 2011 08:02:48
path haroon 18 Feb 2011 08:02:51
recursive haroon 18 Feb 2011 08:02:55

Contact us at files@mathworks.com