Resource

Resource Basics

Resource Name Un-ignore all ignored folders in catalog
Resource Version 1.0
Category Catalog
Downloads 790
Release Date 5/5/2018 9:26:55 AM
 

Resource Details

Description This script will remove the ignore state of EVERY folder in the catalog.
Installation Instructions Download the script to your local hard drive
Usage Instructions 1. Select Tools -> Scripter from the hamburger menu
2. Open the downloaded script
3. Run the script with the run button in the Scripter
Changes in this version first version
Special Requirements
 

Author Information

Author Name IDimager Support
 

Available Attachments

Attachment #1 unignore.png
 

Script

var
  AFilePaths: TCatalogFilePaths;
  AFilePath: TCatalogFilePath;
  i, AHit: Integer;
  AProgress: TxomProgress;
begin
  if not Ask2('Are you sure you want to continue?',
          'This script will remove the ignore state of EVERY folder in the catalog.')
  then
    exit;

  AFilePaths := TCatalogFilePaths.Create(TCatalogFilePath, '');
  try
    PublicCatalog.EnumAllFilePaths(AFilePaths);

    if AFilePaths.Count > 0 then
    begin
      AProgress := TxomProgress.Create(nil);
      try
        AHit := 0;
        AProgress.Max := AFilePaths.Count;
        AProgress.Pos := 0;
        for i := 0 to AFilePaths.Count - 1 do
        begin
          AFilePath := AFilePaths.Items[i];
          AProgress.Pos := i + 1;
          AProgress.ProgressText := AFilePath.FilePath;
          if AFilePath.idIgnored then
          begin
            // unignore the file path
            AFilePath.idIgnored := False;
            if PublicCatalog.UpdateFilePath(AFilePath) then
            begin
              Inc(AHit);
              AProgress.Caption := 'Unignored ' + IntToStr(AHit) + ' filepaths';
            end;
          end;
        end;
      finally
        AProgress.Free;
      end;
    end;
  finally
    AFilePaths.Free;
  end;
end;