> ZipUpdate , v1.00 20-Nov-2001 JGH: Initial version 7 Goes through Zip file, comparing to dir structure (< Produces a list of files that should be in the zipfile 2( Files missing, or updated recently "":date%=date$,2)+32*date$,4,2)+512*date$,7,4) ,: 6outa%=(updfile$) @< BPUT#outa%,"| Updfile to add missing or updated files" Joutd%=(delfile$) T2#outd%,"| Delfile to remove superflous files" ^ Scan("") h0#outd%:outd%=0:"SetType "+delfile$+" Obey" r0#outa%:outa%=0:"SetType "+updfile$+" Text" |  : " "Here"=disk, "There"=zipfile Scan(path$) GScanHere(1): If zip=file, disk=dir -> remove dir, add file IScanThere : If disk=object, zip<>object, -> add object )ScanHere(2): Go into subdirectories  : ScanHere(for%)  i%,l%,r% 113;"Disk";for%;":";path$,2);(11);11,8);   K l%=i%:ș "OS_GBPB",10,dskpath$+path$,dskinfo%,1,i%,40 ,,,r%,i%;A%  (A%1):r%=0 &A dskinfo%?39=13:fn$=$(dskinfo%+20):fn$=fn$,fn$+0,0)-1) 0D dskt%=dskinfo%!16:dskt%=3:dskt%=1: images treated as files :I (up(fn$)<>"!!METADATA" fn$<>46 (dskt%=for% for%=0)) r%=0 D r%=1 N- file -> if missing from zip, add it X+ file -> if newer than zip, add it b! dir -> descend into it l0 Needs to also check for dir/file clash vS PRINT CHR$13;"Disk";for%;":";MID$(path$,2);".";fn$;SPC(11);STRING$(11,CHR$8); 7 dskt%=1:CheckOtherEnd Scan(path$+"."+fn$)   r%=0  : CheckOtherEnd 2 PRINT'"Checking for ";zipfile$;path$;".";fn$ )zipt%=file(zipfile$+path$+"."+fn$,5)  *** This needs looking at: +zipt%=0:AddOther(path$+".",2)+fn$): ? IF diskdate more recent than zipdate:PROCAddOther:ENDPROC  : ScanThere   idx%,last%,ret% (13;"Zip:";path$,2);(11);11,8);   * 4 last%=idx% >L ș "XOS_GBPB",10,zipfile$+path$,zipinfo%,1,idx%,40 ,,,ret%,idx%;A% H (A%1):ret%=0 RA zipinfo%?39=13:fn$=$(zipinfo%+20):fn$=fn$,fn$+0,0)-1) \ zipt%=zipinfo%!16 f& up(fn$)<>"!!METADATA" ret%=0 p ret%=1 z1 file -> if missing from disk, delete it 5 file -> if present on disk, already checked 1 dir -> if missing from disk, delete it < dir -> if present on disk, will be descended into 0 Needs to also check for dir/file clash . dskt1%=file(dskpath$+path$+"."+fn$,5) 3 dskt2%=file(dskpath$+path$+"."+fn$,10),5) P dskt1%=0 dskt2%=0:DelOther(dskpath$+path$,2)+"."+fn$): idx%=last%   ret%=0  : AddOther(A$) #outa%,A$+13;  : DelOther(A$) $&#outd%,"Delete "+A$+"~CFR~V"+13; . 8: Bݤfile(A$,A%) L8ș "XOS_File",A%,A$ X%?0,,X%!2,X%!6,X%!10,X%!14;A% V(A%1):=0 =X%?0 `: jCloseAll t"in%=in%:in%:A%=in%:in%=0:#A% ~'out%=out%:out%:A%=out%:out%=0:#A% ,outa%=outa%:outa%:A%=outa%:outa%=0:#A% ,outd%=outd%:outd%:A%=outd%:outd%=0:#A%  : ݤup(A$): B$:A$="":="" 7B$=B$+(A$ (&DF (A$<"@"))):A$=A$,2):A$="":=B$