folder2batch.m



topics - functions - index - search


folder2batch.m

the filter 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 folder a counterpart is searched in its
directory the foldername of which can be obtained
by replacement of the first given string after the '|'
with the second given string after the '|' in the
foldername of the former folder.
A '\n' signifies the end of the foldername.

example: folder2batch('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

'folder2batch' alone lets you choose all the options,
including the creation of a batch-text-file.

'[filemat]=folder2batch(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 DIR2BATCH.