Resource

Resource Basics

Resource Name Copy Folder Name to Clipboard
Resource Version 1.0
Category File System
Downloads 736
Release Date 8/6/2021 10:46:56 AM
 

Resource Details

Description This script copies the folder name of the selected thumbnails to the clipboard. This can then be pasted/used in other software.
Installation Instructions Download the script
Usage Instructions 1. Select one or more thumbnails
2. Select Tools->Scripter
3. Open the downloaded script
4. Run the script
Changes in this version na
Special Requirements
 

Author Information

Author Name IDimager Support
 

Script

var
  i: Integer;
  ASl: TTntStringList;
begin
  if Selected.Count = 0 then
  begin
    Say('No thumbnail selected');
    exit;
  end;

  ASl := TTntStringList.Create;
  try
    ASl.Sorted := True;
    for i := 0 to Selected.Count - 1 do
    begin
      if ASl.IndexOf(Selected.Items[i].FileNamePath) = -1 then
        ASl.Add(Selected.Items[i].FileNamePath);
    end;
    if ASl.Count > 0 then
    begin
      CopyTextToClipboard(ASl.Text);
      SendVisualFeedback('The folder name for ' + IntToStr(Selected.Count) + ' ' + iif(ASl.Count = 1, 'image', 'images') + ' was copied to the clipboard', 5000);
    end;
  finally
    ASl.Free;
  end;
end;