SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\MetaMonoids"]

FileNames["*.pdf"]

target = "MetaMonoids";
sources = Join[
{"MetaMonoids.tex", "MetaMonoids-JKTR.tex", "main.tex", "00README.XXX"},
{"817_10x_greened.pdf","817labeled.pdf","cloud.pdf","Crossings.pdf","R1.pdf","R2.pdf","R3left_numbered.pdf","R3.pdf","R3right_numbered.pdf","sw1_check.pdf","sw1.pdf","sw2.pdf","Zfigure.pdf"},
Complement[FileNames["*.png"], {"Icon_120.png"}]
]

If[FileType[target<>".zip"]===None || (
FileType[target<>".zip"] === File && OrderedQ[{FileDate[target<>".zip"], Sort[FileDate /@ sources]  // Last}]),
Print["Making ",target,".zip..."];
If[
FileType[target] === Directory,
DeleteDirectory[target, DeleteContents->True]
];
dir=CreateDirectory[target];
CreateDirectory[FileNameJoin[{target, "Mathematica"}]];
CopyFile[# , FileNameJoin[{dir, #}]]& /@ sources;
If[FileType[target<>".zip"] === File, DeleteFile[target<>".zip"]];
CreateArchive[dir, target<>".zip"];
DeleteDirectory[target, DeleteContents->True];
];

{
"TitleNotes"->"
    This is the construction page for <a href=MetaMonoids.pdf>MetaMonoids.pdf</a>; all sources are at <a href=MetaMonoids.zip>MetaMonoids.zip</a>.
    <p>",
"CleanTeX" -> True
}