% % example "20241016" "d:\___Work\" "c" % % stack: directory dir-path ordinal % !Zip.Iter !Zip.Srcer !Zip.Loc _Zip.Loc "\" "$" replall _Zip.Srcer 1 left ^ ^_Zip.Iter "zipock" log)( !Zip.Pocket % % make sure work and focus within work exist % "c:\___Work" folder dup !Zip.Parent &"___Zipper" folder dup !Zip.Gather dup &"___Latest" folder !Zip.Basis dup &"___Source" folder !Zip.Source &"___Focus" folder &_Zip.Inflow folder %%% "targ" log)( !Zip.Target % % stack: ziptext inflow-search % _Zip.Inflow ^_Zip.Basis folder !Zip.Outgo _Zip.Pocket ^_Zip.Source folder %%% "origin" log)( !Zip.Origin empty _Zip.Target % % cycle through pocket folders and obtain the latest entry for each one % { seq121 &"*.*" _vbDirectory exch rot dirmore % % stack: srch-dir next-dir % isnull ? %%% "nextpock" log)( dup extension ".txt" eq$ { % % get the latest text list of files within pocket folder in focus % "*.txt" second ^_Zip.Target folder "AscendF" false "Allt" File.DirOpen { "Allt" File.DirPrev isnull ? %%% "curzipt" log)( % % get the info in this pocket latest version file % % stack: zip-text-file % dup extension ".txt" eq$ { dup read dup !Zip.Cont execstr /* "___Fire.zip" !Zip.Fname "aamgnums_sms numbers aamg.txt" !Zip.Filer "9/23/2025 7:26:14 PM" !Zip.FileDtime "4294967295" !Zip.FileSize "___Fire/Robot/aamgnums_sms numbers aamg.txt" !Zip.FileName "___Fire\Robot\" !Zip.Focus "fd___ZipRecent" !Zip.Ref "d:\___Work\___ZipRecent\" !Zip.Fdir "Robot" !Zip.Inflow "c:\___Work\___Zipper\___Focus\Robot\" !Zip.Outflow "fd___ZipRecent\___Fire.txt" !Zip.Text "2270406" !Zip.Ordinal */ _Zip.Cont _Zip.Filer ^_Zip.Outgo %%% "outgo" log)( dup !Zip.Outgoing write _Zip.FileDtime dup dup _Zip.Outgoing wtime % % create the log entry of more recent than Zip.Root area % _Zip.Filer &"|" _Zip.Outgoing stamp dup !Zip.OutTime & &"|" _Zip.Filer ^_Zip.Root exists { % % the Zip.Root area has that filename % get that files time stamp % _Zip.Filer ^_Zip.Root stamp dup !Zip.InTime & % % record the time differences between the files % _Zip.InTime _Zip.OutTime "d" Time.Diff !Zip.DayDiff _Zip.InTime _Zip.OutTime "h" Time.Diff !Zip.HourDiff _Zip.InTime _Zip.OutTime "n" Time.Diff !Zip.MinDiff _Zip.InTime _Zip.OutTime "s" Time.Diff !Zip.SecDiff % % record whether it is older than the Zip.Root area file % _Zip.InTime _Zip.OutTime "s" Time.Diff positive !Zip.Which % % time zones create ordinal number of hours different % _Zip.SecDiff abs 121 lt { % % the files are within 2 minutes of each other % pop } { % % they are not within two minutes % _Zip.HourDiff abs 7 lt { % % the two files are within 7 hours, check for the time zone displaced % _Zip.SecDiff abs 60 60 mul mod 2 lt { % % they are within two seconds of being hour aligned % pop } { % % not close enough to hour alignment % check which is the greater % _Zip.Which { % % the Zip.Root file is less % ^"a>" logs } { % % the Zip.Root file is more % pop } ifelse } ifelse %% not within hour alignment } { % % they are not within 7 hours of each other % _Zip.Which { ^"7~" logs } { pop } ifelse } ifelse %% not within 7 hours } ifelse %% not within 2 minutes } { % % that file does not exist in Zip.Root % &"---" logs } ifelse %% does not exist in Zip.Root % % track one file for insurance of comparison % _Zip.Filer "aaaaamyip.txt" eq$ { empty "Zip.DayDiff" sval "Zip.HourDiff" sval "Zip.MinDiff" sval "Zip.SecDiff" sval "Zip.Which" sval "Zip.InTime" sval "Zip.OutTime" sval logs } if false } { % % this is not a text file % false } ifelse ? pop } loop pop "Allt" File.DirClose false } { % % the pocket directory name is not a text file % false } ifelse tuck exch rot ? } loop pop % % stack: srch-dir % pop