I was able to canabalize another code and managed to write the file, but now I am stuck with another problem. Here is the code for the writing.
dirName = 'D:\ABN tdump files\ERA -I 10m\April 10m'; %# folder path
files = dir( fullfile(dirName,'.') ); %# list all *.xyz files
files = {files.name}'; %'# file names
[fid,msg] = fopen(sprintf('INFILE'),'wt');
assert(fid>=3,msg)
fprintf(fid,'%s\n',files{:});
fclose(fid);
When the file is written, the first two rows contain 1 or two periods. It is in the cell array called files also. Not sure where it comes from. Is there a way to not have these rows included in the text file or remove them from the cell?