function webfigs_links(httproot)

target_directory = '~/public_html/matlab';
unix(['rm ' target_directory '/links.html']); %Remove Links file
[a b] = unix(['find ' target_directory ' -maxdepth 1 -type d ! -name img ! -name scripts ! -name styles']);
b = regexp(b,'\n','split');
fp = fopen([target_directory '/links.html'],'w');
fprintf(fp,'<ul id="projlist">');
htmls = {};
dates = zeros(length(b)-1,1);
for i = 1:length(b)-1
pname = regexp(b{i},'/','split');

if strcmp(pname{end},'matlab')
dt = [];
else
dt = ['/' pname{end} ];
end;

a = dir([target_directory dt '/matlab.html']);
dates(i) = datenum(a.date);

html = ['<li url="' httproot  dt '/matlab.html"> <span class="liname">' pname{end} ' </span> <span class="lidate"> ' a.date  '</span></li> '];
htmls{i} = html;
end;

[ting idx] = sort(dates);
htmls = {htmls{flipud(idx)}};

for i = 1:length(htmls)
fprintf(fp,htmls{i});
end;


fprintf(fp,'</ul>');
fclose(fp);
return;
