{
 $Id$
}

{ra 1.11}

Procedure Bbs9;
Type
  FILESrecord    = record
                    Name           : String[30];
                    Attrib         : Byte;

                     { Bit 0 : Include in new files scan
                           1 : Include in upload dupe scan
                           2 : Permit long descriptions }

                    FilePath       : String[40];
                    FreeSpace      : Array[1..35] of Byte;
                    UploadSecurity : Word;
                    UploadFlags    : Array[1..4] of byte;
                    Security       : Word;
                    Flags          : Array[1..4] of byte;
                    ListSecurity   : Word;
                    ListFlags      : Array[1..4] of byte;
                  end;

Var
  FFile : File of Filesrecord;
  F     : Filesrecord;
  Tel   : Word;
Begin
  Writeln('Converting RemoteAccess 1.11 file areas.',#10#13);

  Assign(Ffile, BbsPath + 'FILES.RA');
  {$I-} Reset(Ffile); {$I+}
  If ioresult <> 0 then
    Begin
      Writeln('Cannot find '+bbspath+'FILES.RA!');
      Halt;
    End;

  AddToFile(false);

  Tel := 0;
  While not eof(ffile) do
    Begin

      {$I-} Read(Ffile,F); {$I+}
      If ioresult <> 0 then
        Begin
          Writeln('Error reading '+bbspath+'FILES.RA!');
          Halt;
        End;

      Inc(Tel);
      If F.name <> '' then
        Begin
          Inc(Number);
          Bbs.on   := False;
          Bbs.name := F.Name;
          Bbs.nr   := Tel;
          Bbs.path := F.FilePath;
          AddToFile(saveset);
        End;
    End;
  Close(Ffile);
End;

