fid=fopen('C:\WINNT\DESKTOP\mlmlcom.txt');
fid1=fopen('c:\sofex\bin\drifters\mlml1.txt','wt');
fid2=fopen('c:\sofex\bin\drifters\mlml2.txt','wt');
fid3=fopen('c:\sofex\bin\drifters\mlml3.txt','wt');
fid4=fopen('c:\sofex\bin\drifters\mlml4.txt','wt');
while ~feof(fid)
    X=fgetl(fid);
    if strncmp(X,'BUOY1',5)
        fprintf(fid1,'%s\n');
    elseif strncmp(X,'BUOY2',5)
        fprintf(fid2,'%s\n');
    elseif strncmp(X,'BUOY3',5)
        fprintf(fid3,'%s\n');
    elseif strncmp(X,'BUOY4',5)
        fprintf(fid4,'%s\n');
    end;
end;
%fclose(fid);fclose(fid1);fclose(fid2);fclose(fid3);fclose(fid4);clear all;close all;
%copyfile ('c:\sofex\bin\drifters\mlml1.txt','\\Hematite\sofex\bin\drifters\mlml1.txt');
%copyfile ('c:\sofex\bin\drifters\mlml2.txt','\\Hematite\sofex\bin\drifters\mlml2.txt');
%copyfile ('c:\sofex\bin\drifters\mlml3.txt','\\Hematite\sofex\bin\drifters\mlml3.txt');
%copyfile ('c:\sofex\bin\drifters\mlml4.txt','\\Hematite\sofex\bin\drifters\mlml4.txt');

