home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / AVAILIST.ZIP / AVAILIST.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-01-04  |  18.9 KB  |  521 lines

  1. {*****************************************************************************
  2.  *                                                                           *
  3.  *                       AvaiList.Pas By Andrew Farmer                       *
  4.  *            Main Source Code Module for AvaiList Revision 1.10             *
  5.  *                                                                           *
  6.  *         Copyright 1989 by Andrew D. Farmer, All Rights Reserved.          *
  7.  *                                                                           *
  8.  *                                                                           *
  9.  *     Compiled using Turbo Pascal Version 5.0 By Borland International      *
  10.  *                                                                           *
  11.  *****************************************************************************}
  12.  
  13. Program AvaiList_By_Andrew_Farmer;
  14.  
  15. {$R-}            {Range checking off}
  16. {$B+}            {Boolean complete evaluation on}
  17. {$S+}            {Stack checking on}
  18. {$I+}            {I/O checking on}
  19. {$N-}            {No floating point coprocessor}
  20. {$E-}            {No emulation coprocessor}
  21. {$M 48000,0,0}   {Allocate 48000 bytes on the Stack, No Heap}
  22.  
  23. Uses Dos, Crt;
  24.  
  25. const
  26.   version   : String[5]  = '1.10';
  27.   copyright : String[47] = ' - Copyright 1989 by Andrew Farmer of 1:163/115';
  28.  
  29. Type
  30.   Opus = Record
  31.     Junk1         : Word;
  32.     Junk2         : Word;
  33.     Message       : Array[1..40] of Char ; 
  34.     System        : Array[1..40] of Char ; 
  35.     Help          : Array[1..40] of Char ; 
  36.     Upload        : Array[1..40] of Char ; 
  37.     DownLoad      : Array[1..40] of Char ; 
  38.   End;
  39.  
  40. Var { ----------------------- Variable Deffinitions ------------------------- }
  41.   Buf                                            : Array[1..8192] of Char;
  42.   Paths                                          : Array[1..300] of String[79];
  43.   Debug, DoArc, DoNewList, DoOpus, FlagNew, KillOrphan, MoveIt  : Boolean;
  44.   NoDate, Ok, Quiet, StripCom, TotArea                          : Boolean;
  45.   OutPath, NewPath                                              : DirStr;
  46.   OutExt, NewExt                                                : ExtStr;
  47.   SortL                                                         : File of Opus;
  48.   SearchTime                                                    : DateTime;
  49.   Syst                                                          : Opus;
  50.   CountOpus, ck1, ck2, ck3, ck5, n, count, count2, count3       : Integer;
  51.   Fcount, TotalFile, TotalNFile, FlagDays, NowJD, FileJD, Ve    : Integer;
  52.   NewTot, Code, CountParamStr, AreaTotal, PathCount, PathInc    : Integer;
  53.   FileInc, FileCount, TotalAdd, JD, DiffJD                      : Integer;
  54.   TotalSize, TotalNSize, AreaSize                               : LongInt;
  55.   OutName, NewName                                              : NameStr;
  56.   OutList, OutArc, ThePath, FlagCheck, NewArc, ConfigFile       : PathStr;
  57.   HeadFile, ExiFile, OpusPath                                   : PathStr;
  58.   ck4                                                           : Real;
  59.   SearchData                                                    : SearchRec;
  60.   BoxType, Pchk, Pcheck, FC1, PR1, Versions ,Sarea, FlagChar    : String[1];
  61.   TL, TR, BL, BR, LR, TB, Slash, GP, GP1, Ch                    : String[1];
  62.   minu, secu, houru, dayu, num, Fmonth, Fday, FlagIt,FlagString : String[2];
  63.   mh, DoIt, CountOp                                             : String[3];
  64.   Vers, Fyear                                                   : String[4];
  65.   GrandChk, check2, check3, dayn, yearn, hourn, ArcCmd, FSize   : String[7];
  66.   Fdate                                                         : String[8];
  67.   month2, dow, VerString                                        : string[9];
  68.   TheFile, FileCheck, PR2, Parm1                                : String[12];
  69.   FC2, Fspace                                                   : String[13];
  70.   FC3, TheDesc, PR3                                             : String[60];
  71.   Dirbbs                                                        : String[73];
  72.   GraphLine, Filesbbs, parm2, TheTop, GetFiles                  : String[79];
  73.   DateCh1, DateCh2, Ch1, Ch2,TotCount,SortDir,ListLine,OpusFile : String[80];
  74.   Pstr, Ps, Pr, SortFiles, SortArea, HelloDos, CallArc,GetPaths : String[80];
  75.   Tf, f1, SortList, ListIn, ListOut, StErr, DirCopy             : Text;
  76.   FileCopy, KillIt, ReadCfg, NewIn, NewOut                      : Text;
  77.   sec, smallsec, hour, min, Year, Month, day, dofweek           : Word;
  78.  
  79. Label 1, 2, 102, 103, 104, 105; { Jump Labels }
  80.  
  81. {$I AL_TIME.PAS}    {Include The Time Routines}
  82. {$I AL_READ.PAS}    {Include the Read/Write Routines}
  83.  
  84. Procedure LogFile (Code, LogEntry : String);
  85. Begin
  86.   Time;
  87.   Date;
  88.   Writeln(Code,' ',dayu,' ',mh,' ',Houru,':',Minu,':',Secu,' ALST ',LogEntry);
  89. End;
  90.  
  91. Procedure Banner;
  92. Begin
  93.   VerString := '';
  94.   Versions := copy(version,4,1);
  95.   If Versions <> '0' then VerString := 'a Beta';
  96.   Versions := copy(version,5,1);
  97.   If Versions <> '' then VerString := 'an Alpha';
  98.   Assign(StErr,'CON');
  99.   ReWrite(StErr);
  100.   Writeln(StErr,'');
  101.   Writeln(StErr,'AvaiList, Revision: ',version,copyright,'.');
  102.   If VerString <> '' then Writeln(StErr,'This Revision is ',VerString,' Test Copy only.  Please do not distribute.');
  103.   Writeln(StErr,'');
  104.   Close(StErr);
  105. End; {Procedure Banner}
  106.  
  107. Procedure Run_Time;
  108. Begin
  109.   Assign(StErr,'CON');
  110.   ReWrite(StErr);
  111.   If Quiet = True then Writeln(StErr,'Quiet Mode engaged...');
  112.   If Quiet = False then
  113.   Begin
  114.     Writeln(StErr,'RunTime Configuration...');
  115.     Writeln(StErr,'');
  116.     Writeln(StErr,'Header File:      ',HeadFile);
  117.     Writeln(StErr,'Extra Info File:  ',ExiFile);
  118.     Writeln(StErr,'Master List:      ',OutList);
  119.     If DoArc = True then Writeln(StErr,'Master Archive:   ',OutArc);
  120.     If DoNewList = True then Writeln(StErr,'NewFile List:     ',FlagCheck);
  121.     If (DoNewList = True) AND (DoArc = True) then Writeln(StErr,'NewFile Archive:  ',NewArc);
  122.     Writeln(StErr,'');
  123.     Writeln(StErr,'AvaiList will create header blocks using BoxType ',BoxType);
  124.     If DoOpus = True then Writeln(StErr,'AvaiList will use Opus System.Bbs files for Path Information');
  125.     If DoNewList = False then Writeln(StErr,'AvaiList will not create a NewFile list');
  126.     If DoArc = True then Writeln(StErr,'AvaiList will use ',ArcCmd,' for archiving');
  127.     If (DoArc = False) AND (DoNewList = True) then Writeln(StErr,'AvaiList will not archive the finished lists');
  128.     If (DoArc = False) AND (DoNewList = False) then Writeln(StErr,'AvaiList will not archive the finished list');
  129.     If (MoveIt = True) AND (DoArc = True) then Writeln(StErr,'AvaiList will delete the original after archiving');
  130.     If (MoveIt = False) AND (DoArc = True) then Writeln(StErr,'AvaiList will not delete the original after archiving');
  131.     If StripCom = True then Writeln(StErr,'AvaiList will not include files.bbs comments in master list');
  132.     If StripCom = False then Writeln(StErr,'AvaiList will include files.bbs comments in master list');
  133.     If NoDate = True then Writeln(StErr,'AvaiList will not include file dates in master list');
  134.     If NoDate = False then Writeln(StErr,'AvaiList will include file dates in master list');
  135.     If FlagNew = True then 
  136.     Begin
  137.       Writeln(StErr,'AvaiList will flag files less than ',FlagDays,' days old');
  138.       Writeln(StErr,'AvaiList will use the ''',flagchar,''' character to mark New Files');
  139.     End;
  140.     If FlagNew = False then Writeln(StErr,'AvaiList will not flag new files');
  141.     If KillOrphan = True then Writeln(StErr,'AvaiList will not include missing or offline files in master list');
  142.     If KillOrphan = False then Writeln(StErr,'AvaiList will include missing or offline files in master list');
  143.     If TotArea = True then Writeln(StErr,'AvaiList will report files/bytes totals for each area');
  144.     If TotArea = False then Writeln(StErr,'AvaiList will not report files/bytes totals for each area');
  145.   End;
  146.   Writeln(StErr,'');
  147.   Close(StErr);
  148. End;
  149.  
  150. Procedure Report_Error (Line : String ; Code : Integer);
  151. Begin
  152.   Assign(StErr,'CON');
  153.   Rewrite(StErr);
  154.   Writeln(StErr,'');
  155.   Writeln(StErr,Line);
  156.   Close(StErr);
  157.   Halt(code);
  158. End;
  159.  
  160. {$I AL_CFG.PAS}
  161.  
  162. Begin
  163.   Assign(Input,''); Reset(Input); Assign(Output,''); Rewrite(Output);
  164.   CheckBreak := False;
  165.   HelloDOS := GetEnv('ComSpec');
  166.   Vers := Copy(Version,1,4);
  167.   TotalSize := 0;
  168.   TotalFile := 0;
  169.   TotalNSize := 0;
  170.   TotalNFile := 0;
  171.   ck1 := 0;
  172.   ck2 := 0;
  173.   ck3 := 0;
  174.   ck4 := 0;
  175.   ck5 := 0;
  176.   Quiet := False;
  177.   DoArc := False;
  178.   DoOpus := False;
  179.   NoDate := False;
  180.   MoveIt := False;
  181.   FlagNew := False;
  182.   DoNewList := False;
  183.   KillOrphan := False;
  184.   Debug := False;
  185.   TotArea := True;
  186.   ArcCmd := 'ZOO';
  187.   FlagChar := '*';
  188.   PathInc := 0;
  189.   PathCount := 0;
  190.   FileInc := 0;
  191.   FileCount := 0;
  192.   ConfigFile := 'AvaiList.Cfg';
  193.   HeadFile := 'AvaiList.Hdr';
  194.   ExiFile  := 'AvaiList.Exi';
  195.   OpusPath := '\';
  196.   StripCom := False;
  197.   OutList := '';
  198.   OutArc := '';
  199.   FlagCheck := '';
  200.   NewArc := '';
  201.   FlagDays := 7;
  202.   BoxType := '4';
  203.   Banner;
  204.   If ParamCount <> 0 then Pre_Cmd_Check;
  205.   ConfigFile := FExpand(ConfigFile);
  206.   If ParamCount <> 0 then Config_Read;
  207.   Command_Line;
  208.   HeadFile := FExpand(HeadFile);
  209.   ExiFile := FExpand(ExiFile);
  210.   If BoxType = '0' then
  211.   Begin
  212.     TL := '-'; TR := '-';
  213.     BL := '-'; BR := '-';
  214.     LR := '-'; TB := ' ';
  215.   End;
  216.   If BoxType = '1' then
  217.   Begin
  218.     TL := '┌'; TR := '┐';
  219.     BL := '└'; BR := '┘';
  220.     LR := '─'; TB := '│';
  221.   End;
  222.   If BoxType = '2' then
  223.   Begin
  224.     TL := '╔'; TR := '╗';
  225.     BL := '╚'; BR := '╝';
  226.     LR := '═'; TB := '║';
  227.   End;
  228.   If BoxType = '3' then
  229.   Begin
  230.     TL := '╓'; TR := '╖';
  231.     BL := '╙'; BR := '╜';
  232.     LR := '─'; TB := '║';
  233.   End;
  234.   If BoxType = '4' then
  235.   Begin
  236.     TL := '╒'; TR := '╕';
  237.     BL := '╘'; BR := '╛';
  238.     LR := '═'; TB := '│';
  239.   End;
  240.   TheTop := LR;
  241.   For N := 1 to 76 do
  242.   TheTop := TheTop + LR;
  243.   If (DoOpus = False) and (PathCount = 0) then Goto 102;
  244.   If DoOpus =  True then 
  245.   Begin
  246.     Slash := Copy(OpusPath,Length(OpusPath),1);
  247.     If Slash <> '\' then OpusPath := OpusPath + '\';
  248.     OpusFile := Concat(OpusPath,'System.Bbs');
  249.     Assign(SortL,OpusFile);
  250.     {$I-} Reset(SortL); {$I+}
  251.     If IOResult <> 0 then goto 105;
  252.     Close(SortL);
  253.   End;
  254.   OutList := FExpand(OutList);
  255.   Assign(ListOut,OutList);
  256.   {$I-} ReWrite(ListOut); {$I+}
  257.   OK := (IOResult = 0);
  258.   If NOT OK then goto 103;
  259.   Close(ListOut);
  260.   If DoNewList = TRUE then
  261.   Begin
  262.     Assign(NewOut,FlagCheck);
  263.     {$I-} ReWrite(NewOut); {$I+}
  264.     OK := (IOResult = 0);
  265.     If Not OK then goto 104;
  266.     Close(NewOut);
  267.   End;
  268.   If ArcCmd = '' then ArcCmd := 'ZOO';
  269.   FSplit(OutList,OutPath,OutName,OutExt);
  270.   OutArc := OutPath + OutName + '.' + ArcCmd;
  271.   If ArcCmd = 'PKARC' then OutArc := OutPath + OutName + '.ARC';
  272.   If ArcCmd = 'PKPAK' then OutArc := OutPath + OutName + '.ARC';
  273.   If DoNewList = TRUE then
  274.   Begin
  275.     FlagCheck := FExpand(FlagCheck);
  276.     FSplit(FlagCheck,NewPath,NewName,NewExt);
  277.     NewArc := NewPath + NewName + '.' + ArcCmd;
  278.     If ArcCmd = 'PKARC' then NewArc := NewPath + NewName + '.ARC';
  279.     If ArcCmd = 'PKPAK' then NewArc := NewPath + NewName + '.ARC';
  280.   End;
  281.   Run_Time;
  282.   LogFile('+','Begin, AvaiList ' + version);
  283.   LogFile('#','Un-linking Old Master Files');
  284.   Assign(f1,OutList);
  285.   {$I-} Reset(f1) {$I+};
  286.   OK := (IOResult = 0);
  287.   If Ok then begin Close(f1); Erase(f1); End;
  288.   If DoNewList = TRUE then
  289.   Begin
  290.     Assign(f1,FlagCheck);
  291.     {$I-} Reset(f1) {$I+};
  292.     OK := (IOResult = 0);
  293.     If Ok then begin Close(f1); Erase(f1); End;
  294.   End;
  295.   If DoArc = TRUE then
  296.   Begin
  297.     Assign(f1,OutArc);
  298.     {$I-} Reset(f1) {$I+};
  299.     OK := (IOResult = 0);
  300.     If Ok then begin Close(f1); Erase(f1); End;
  301.     If DoNewList = TRUE then
  302.     Begin
  303.       Assign(f1,NewArc);
  304.       {$I-} Reset(f1) {$I+};
  305.       OK := (IOResult = 0);
  306.       If Ok then begin Close(f1); Erase(f1); End;
  307.     End;
  308.   End;
  309.   LogFile(' ','Calculating Date/Time Stamp');
  310.   Time;
  311.   Date;
  312.   Str(Day,Dayn);
  313.   Str(Year,Yearn);
  314.   Ch1 := ConCat('Master List of ALL files in system on ',dow,', ',month2,' ',dayn,', ',yearn,' at ',houru,':',minu);
  315.   Ch2 := ConCat('Master List of NEW files in system on ',dow,', ',month2,' ',dayn,', ',yearn,' at ',houru,':',minu);
  316.   For n := 1 to length(ch1) do
  317.   ck1 := ck1 + 1;
  318.   ck2 := 77 - ck1;
  319.   ck4 := ck2 / 2;
  320.   ck3 := round(ck4);
  321.   ck5 := ck2 - ck3;
  322.   if ck3 = 0 then check2 := '';
  323.   if ck3 = 1 then check2 := ' ';
  324.   if ck3 = 2 then check2 := '  ';
  325.   if ck3 = 3 then check2 := '   ';
  326.   if ck3 = 4 then check2 := '    ';
  327.   if ck3 = 5 then check2 := '     ';
  328.   if ck5 = 0 then check3 := '';
  329.   if ck5 = 1 then check3 := ' ';
  330.   if ck5 = 2 then check3 := '  ';
  331.   if ck5 = 3 then check3 := '   ';
  332.   if ck5 = 4 then check3 := '    ';
  333.   if ck5 = 5 then check3 := '     ';
  334.   Assign(ListOut,OutList);
  335.   {$I-} ReWrite(ListOut); {$I+}
  336.   OK := (IOResult = 0);
  337.   If Not OK then goto 103;
  338.   Assign(ListIn,HeadFile);
  339.   SetTextBuf(ListIn,Buf);
  340.   {$I-} Reset(ListIn); {$I+}
  341.   OK := (IOResult = 0);
  342.   If OK then
  343.   Begin
  344.     Repeat
  345.       Readln(ListIn,ListLine);
  346.       Writeln(ListOut,ListLine);
  347.     Until EOF(ListIn);
  348.     Close(ListIn);
  349.   End;
  350.   Writeln(ListOut,TL,TheTop,TR);
  351.   Writeln(ListOut,TB,check2,ch1,check3,TB);
  352.   If FlagNew = True then
  353.   Begin
  354.     Writeln(ListOut,TB,'                                                                             ',TB);
  355.     If NoDate = False then Write(ListOut,TB,'    Files marked with ',FlagChar,' following the FileDate ');
  356.     If NoDate = True then Write(ListOut,TB,'    Files marked with ',FlagChar,' following the FileSize ');
  357.     Writeln(ListOut,'are less than ',flagdays:2,' days old.    ',TB);
  358.   end;
  359.   Writeln(ListOut,BL,TheTop,BR);
  360.   Assign(ListIn,ExiFile);
  361.   SetTextBuf(ListIn,Buf);
  362.   {$I-} Reset(ListIn); {$I+}
  363.   OK := (IOResult = 0);
  364.   If OK then
  365.   Begin
  366.     Repeat
  367.       Readln(ListIn,ListLine);
  368.       Writeln(ListOut,ListLine);
  369.     Until EOF(ListIn);
  370.     Close(ListIn);
  371.   End;
  372.   If DoNewList = True then
  373.   Begin
  374.     Assign(NewOut,FlagCheck);
  375.     {$I-} ReWrite(NewOut); {$I+}
  376.     OK := (IOResult = 0);
  377.     If Not OK then goto 104;
  378.     Assign(NewIn,HeadFile);
  379.     SetTextBuf(NewIn,Buf);
  380.     {$I-} Reset(NewIn); {$I+}
  381.     OK := (IOResult = 0);
  382.     If OK then
  383.     Begin
  384.       Repeat
  385.         Readln(NewIn,ListLine);
  386.         Writeln(NewOut,ListLine);
  387.       Until EOF(NewIn);
  388.       Close(NewIn);
  389.     End;
  390.     Writeln(NewOut,TL,TheTop,TR);
  391.     Writeln(NewOut,TB,check2,ch2,check3,TB);
  392.     Writeln(NewOut,TB,'                                                                             ',TB);
  393.     Writeln(NewOut,TB,'     This listing only contains the files that are less than ',Flagdays:2,' days old.    ',TB);
  394.     Writeln(NewOut,BL,TheTop,BR);
  395.   End;
  396.   If DoOpus = True then
  397.   Begin
  398.     LogFile('#','Reading Opus System Files');
  399.     CountOpus := 0;
  400.     Repeat
  401.       CountOpus := CountOpus + 1;
  402.       Str(CountOpus,CountOp);
  403.       OpusFile := Concat(OpusPath,'System',CountOp,'.Bbs');
  404.       Assign(SortL,OpusFile);
  405.       {$I-} Reset(SortL); {$I+}
  406.       If IOResult <> 0 then begin CountOpus := 99; goto 2; End;
  407.       Read(SortL,Syst);
  408.       GetPaths := Copy(Syst.Download,1,Length(Syst.Download));
  409.       GP := Copy(GetPaths,1,1); GP1:= Copy(GetPaths,2,1);
  410.       If (GP1 = ':') and (GP <> #0) then
  411.       Begin
  412.         Inc(PathInc);
  413.         Paths[PathInc] := GetPaths;
  414.       End;
  415.       Close(SortL);
  416.       2:
  417.     Until CountOpus = 99;
  418.     PathCount := PathInc;
  419.     PathInc := 0;
  420.   End;
  421.   Repeat
  422.     If PathCount = 0 then goto 102;
  423.     NewTot := 0;
  424.     AreaTotal := 0;
  425.     AreaSize := 0;
  426.     Inc(PathInc);
  427.     SortArea := Paths[PathInc];
  428.     Sarea := Copy(SortArea,1,1);
  429.     If (SortArea = '') or (Sarea = '') or (Sarea = ' ') or (Sarea = ';') then goto 1;
  430.     SortArea := FExpand(SortArea);
  431.     Slash := Copy(SortArea,Length(SortArea),1);
  432.     If Slash <> '\' then SortArea := SortArea + '\';
  433.     SortFiles := SortArea + 'Files.Bbs';
  434.     SortDir := SortArea + 'Dir.Bbs';
  435.     LogFile(':','Processing ' + SortArea);
  436.     ReadDirBbs;
  437.     ReadFilesbbs;
  438.     If (DoNewList = True) AND (NewTot = 0) then Writeln(NewOut,'No Files');
  439.     If (TotArea = True) AND (AreaTotal <> 0) then
  440.     Begin
  441.       Writeln(ListOut,'');
  442.       Writeln(ListOut,'> Total of ',AreaTotal,' files (',AreaSize,' bytes) in this Area');
  443.     End;
  444.     1:
  445.   Until PathInc = PathCount;
  446.   Writeln(ListOut,'');
  447.   Writeln(ListOut,TL,TheTop,TR);
  448.   Writeln(ListOut,TB,' Total number of files = ',TotalFile:5,'             Total number of bytes = ',TotalSize:9,' ',TB);
  449.   Writeln(ListOut,TB,'                                                                             ',TB);
  450.   Writeln(ListOut,TB,' Compiled using AvaiList ',vers,copyright,' ',TB);
  451.   Writeln(ListOut,BL,TheTop,BR);
  452.   Close(ListOut);
  453.   If DoNewList = True then
  454.   Begin
  455.     Writeln(NewOut,'');
  456.     Writeln(NewOut,TL,TheTop,TR);
  457.     Writeln(NewOut,TB,' Total number of files = ',TotalNFile:5,'             Total number of bytes = ',TotalNSize:9,' ',TB);
  458.     Writeln(NewOut,TB,'                                                                             ',TB);
  459.     Writeln(NewOut,TB,' Compiled using AvaiList ',vers,copyright,' ',TB);
  460.     Writeln(NewOut,BL,TheTop,BR);
  461.     Close(NewOut);
  462.   End;
  463.   If DoArc = TRUE then
  464.   Begin
  465.     LogFile('#','Creating "Master" File Archive');
  466.     If ArcCmd <> 'ZOO' then
  467.     Begin
  468.       If MoveIt = True then DoIt := 'm';
  469.       If MoveIt = False then DoIt := 'a';
  470.     End;
  471.     If ArcCmd = 'ZOO' then
  472.     Begin
  473.       If MoveIt = True then DoIt := 'aM:';
  474.       If MoveIt = False then DoIt := 'a:';
  475.     End;
  476.     If Debug then 
  477.     Begin
  478.       CallArc := Concat('/c ',ArcCmd,' ',DoIt,' ',OutArc,' ',OutList);
  479.       Writeln;
  480.       Writeln('> ',HelloDOS,' ',CallArc);
  481.       Writeln;
  482.       Exec(HelloDOS,CallArc);
  483.       Writeln;
  484.     End;
  485.     If Not Debug then 
  486.     Begin
  487.       CallArc := Concat('/c ',ArcCmd,' ',DoIt,' ',OutArc,' ',OutList,' >Nul');
  488.       Exec(HelloDOS,CallArc);
  489.     End;
  490.     If DoNewList = True then
  491.     Begin
  492.       LogFile('#','Creating "New" File Archive');
  493.       If Debug then 
  494.       Begin
  495.         CallArc := Concat('/c ',ArcCmd,' ',DoIt,' ',NewArc,' ',FlagCheck);
  496.         Writeln;
  497.         Writeln('> ',HelloDOS,' ',CallArc);
  498.         Writeln;
  499.         Exec(HelloDOS,CallArc);
  500.         Writeln;
  501.       End;
  502.       If Not Debug then 
  503.       Begin
  504.         CallArc := Concat('/c ',ArcCmd,' ',DoIt,' ',NewArc,' ',FlagCheck,' >Nul');
  505.         Exec(HelloDOS,CallArc);
  506.       End;
  507.     End;
  508.   End;
  509.   LogFile('+','End, AvaiList ' + version);
  510.   Writeln;
  511.   Halt(0);
  512.   102:
  513.   Report_Error('No File Area Directories were specified, aborting.',2);
  514.   103:
  515.   Report_Error('Unable to Write to selected Master File List ''' + outlist + ''', aborting.',3);
  516.   104:
  517.   Report_Error('Unable to Write to selected New File List ''' + FlagCheck + ''', aborting.',4);
  518.   105:
  519.   Report_Error('Unable to Find or Read from Opus System.Bbs files, aborting.',5);
  520. End.
  521.