Documentation of findfilesup

Global Index (all files) (short | long) | Local contents | Local Index (files in subdir) (short | long)

Function Synopsis

[PathFileList, FileList, PathList] = findfilesup(SearchFileMask, SearchPathMask, SearchLevels, SearchMode)

Help text

 Find Files upwards the directory structure regarding a search mask 

 This function searches for files in the current directory and depending
 on the given SearchLevel upwards through directories.
 The search file mask can conatin * for searching with wildcards.
 The search path mask can also contain * as wildcard. Please
 keep in mind, that the search path upwards has only one directory 
 at each level.
 The utility function findfiles is used for the actual search process.
 Currently always the full path is returned (absolute path).

 Syntax:  [PathFileList, FileList, PathList] = findfilesup(SearchFileMask, SearchPathMask, SearchLevel)

 Input parameter:
   SearchFileMask - String or cell array of strings containing the file mask
                       to search for {'*.m'; 'ma*'; '*am.mat'}
                       if omitted or empty '*' is used
                       if NaN (not a string): search for all directories
   SearchPathMask - String containing the path to search on
                       The path may contain as many masks (*) as necessary
                       and also on lower levels {'v:\ge*\pl*\fritz'}, the extension 
                       of the * is handled by the function
                       special strings: '' or '.': current directory
                       if omitted or empty '.' (current directory) is used
   SearchLevel    - Scalar indicating how much levels of directorys (beginning with the SearchPath)
                       should be searched
                       1: only SearchPath
                       n: SearchPath + (n-1) levels upwards
                       if omitted or empty 1 is used

 Output parameter:
   PathFileList- Cell array of string(s) containing the path and name of the found files
   FileList    - Cell array of string(s) containing the name of the found files
   PathList    - Cell array of string(s) containing the path of the found files

   % Search in directory TSeq001 and 3 levels up for files with mask *SystemOption.m
   % not recursively
   >> [pfl, fl, pl] = findfiles('*SystemOptions.m', 'TSeq001', 4);
      pfl = 
      fl = 
      pl = 

   % Search in directories gea*\gr* and in geaobj for files with mask *an*.m and *objfun1*.mat
   % not recursively
   >> [pfl, fl, pl] = findfiles({'*am*.m'; '*objfun1*.mat'}, {'gea*\p*', 'geaobj\gr*'});
      pfl = 
      fl = 
      pl = 

 See also: findfiles, dir

Cross-Reference Information

This function calls
GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions 

This document is part of version 3.8 of the GEATbx: Genetic and Evolutionary Algorithm Toolbox for use with Matlab -
The Genetic and Evolutionary Algorithm Toolbox is not public domain.
© 1994-2006 Hartmut Pohlheim, All Rights Reserved, (