dir2batch.m
the search string as part of their names. You are
asked to supply a parent-directory that will be
searched. If 'filter' is a string containing '|', for
each found file a counterpart is searched in its
directory the filename of which can be obtained
by replacement of the first given string after the '|'
with the second given string after the '|' in the
filename of the former file.
A '\n' signifies the end of the filename.
example: dir2batch('at1|at1 at2')
directory('C:\test\') content:
01.baseline.at1.ar
01.baseline.at2.ar
01.ZEROS.txt
02.baseline.at1
02.baseline.at2
text.txt
data.dat
will find:
C:\test\01.baseline.at1.ar
C:\test\01.baseline.at2.ar
C:\test\02.baseline.at1
C:\test\02.baseline.at2
example: dir2batch('at1\n|at1 at2\n')
will find:
C:\test\02.baseline.at1
C:\test\02.baseline.at2
'dir2batch' alone lets you choose all the options,
including the creation of a batch-text-file.
'[filemat]=dir2batch(filepath,subfolderstatus,...
batchfilestatus,pathstatus,filterstatus,filter,defaultfilter)'
serves as the functional form of dir2batch.
'filepath' is the parent-directory to be searched.
'subfolderstatus' (1/0) determines wether subfolders
will be searched, 'batchfilestatus' ('y'/'n') determines
creation of a batchfile, 'pathstatus' ('y'/'n') decides
printing of full paths vs. filnames only, 'filterstatus'
('y'/'n') decides wether a filter-string is used (if 'n' all
files in directory are chosen), 'defaultfilter' sets a new
defaultfilter.
See also FOLDER2BATCH.