anchor.diff:  end;
   
   
  -procedure TForm1.btnValidateAllClick(Sender: TObject);
  -var
  -  I: Integer;
  -begin
  -  EnableFormComponents(False);
  -
  -  Memo1.Lines.Clear;
  -
  -  Memo1.Lines.Append('Check ' + ExtractFilePath(ParamStr(0)));
  -  // Exe path
  -  TKMapsCollection.GetAllMapPaths(ExtractFilePath(ParamStr(0)), fListFileInFolder);
  +procedure TForm1.ValidateFileList;
  +var
  +  I,ErrFilesCnt: Integer;
  +begin
  +  ErrFilesCnt := 0;
     if fListFileInFolder.Count = 0 then
       Memo1.Lines.Append('No files in a directory :(')
     else
     begin
       Memo1.Lines.Append('Files in the folder: '+IntToStr(fListFileInFolder.Count));
       for I := 0 to fListFileInFolder.Count - 1 do
  -      Validate(ChangeFileExt(fListFileInFolder[I], '.' + EXT_FILE_SCRIPT), False);
  -
  -    Memo1.Lines.Append('Checked ' + IntToStr(fListFileInFolder.Count) + ' in .\');
  -  end;
  +      if not Validate(ChangeFileExt(fListFileInFolder[I], '.' + EXT_FILE_SCRIPT), False) then
  +        Inc(ErrFilesCnt);
  +
  +    Memo1.Lines.Append(Format('Checked: %d. Script files with errors: %d', [fListFileInFolder.Count, ErrFilesCnt]));
  +  end;
  +end;
  +
  +
  +procedure TForm1.ValidateDir(aDir: String);
  +begin
  +  Memo1.Lines.Clear;
  +  Memo1.Lines.Append('Check ' + aDir);
  +  TKMapsCollection.GetAllMapPaths(aDir, fListFileInFolder);
  +  ValidateFileList;
  +end;
  +
  +
  +procedure TForm1.btnValidateAllClick(Sender: TObject);
  +begin
  +  EnableFormComponents(False);
  +
  +  // Exe path
  +  ValidateDir(ExtractFilePath(ParamStr(0)));
     // Utils path
  -  Memo1.Lines.Append('Check ' + ExpandFileName(ExtractFilePath(ParamStr(0)) + '..\..\'));
  -  TKMapsCollection.GetAllMapPaths(ExpandFileName(ExtractFilePath(ParamStr(0)) + '..\..\'), fListFileInFolder);
  -  if fListFileInFolder.Count = 0 then
  -    Memo1.Lines.Append('No files in a directory :(')
  -  else
  -  begin
  -    Memo1.Lines.Append('Files in the folder: '+IntToStr(fListFileInFolder.Count));
  -    for I := 0 to fListFileInFolder.Count - 1 do
  -      Validate(ChangeFileExt(fListFileInFolder[I], '.' + EXT_FILE_SCRIPT), False);
  -
  -    Memo1.Lines.Append('Checked ' + IntToStr(fListFileInFolder.Count));
  -  end;
  +  ValidateDir(ExpandFileName(ExtractFilePath(ParamStr(0)) + '..\..\'));
  +
     EnableFormComponents(True);
   end;
   
  -procedure TForm1.Validate(aPath: string; aReportGood: Boolean);
  +function TForm1.Validate(aPath: string; aReportGood: Boolean): Boolean;
   var
     CampaignFile: UnicodeString;
     txt:          string;
   begin
  +  Result := True;
     if not FileExists(aPath) and aReportGood then
     begin
       Memo1.Lines.Append('File not found ' + aPath);
  
positive.code: 
  
  procedure TForm1.btnValidateClick(Sender: TObject);
  var
    I : Integer;
  begin
    EnableFormComponents(False);
  
    Memo1.Lines.Clear;
    if fIsValidatePath = fof_Folder then
    begin
  
negative.code:   end;
  
    if txt <> '' then
    begin
      Memo1.Lines.Append(aPath + sLineBreak + txt);
      Result := False;
    end else
      if aReportGood then
        Memo1.Lines.Append(aPath + ' - No errors :)');
  end;
  