Home > utility > fileList2file.m

fileList2file

PURPOSE ^

fileList2file: Save list of files in a directory to a file

SYNOPSIS ^

function fileList2file(dirName, extName, outputFile)

DESCRIPTION ^

 fileList2file: Save list of files in a directory to a file
    Usage: fileList2file(dirName, extName, outputFile)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function fileList2file(dirName, extName, outputFile)
0002 % fileList2file: Save list of files in a directory to a file
0003 %    Usage: fileList2file(dirName, extName, outputFile)
0004 
0005 %    Roger Jang, 20100412
0006 
0007 fprintf('Reading %s...\n', dirName);
0008 fileData=recursiveFileList(dirName, extName);
0009 
0010 fprintf('Saving %s\n', outputFile);
0011 fid=fopen(outputFile, 'w');
0012 for i=1:length(fileData)
0013     fprintf(fid, '%s\n', fileData(i).path);
0014 end
0015 fclose(fid);

Generated on Tue 01-Jun-2010 09:50:34 by m2html © 2003