在 macOS 搜索结果中隐藏重复文件?

Hide duplicate files in macOS search results?

我不想删除重复文件,但我只想查看每个文件的一个实例。

在这种情况下,重复项之间的优先级无关紧要。

///

实际场景:

我想创建一个 VLC 播放列表,其中包含我从特定域下载的所有视频。这些文件组织不当,许多文件存在于我计算机上的多个位置。因此,Finder 搜索“Where from”--> [域] returns 许多重复文件。这意味着我不能只是将搜索结果拖放到 VLC 中而不会有很多重复项。

我不想对文件本身进行重复数据删除。

我怎样才能做到这一点?

无法在 Finder 搜索中隐藏重复项,因为在 Finder 搜索中没有过滤重复项的选项。

但您的工作是搜索,然后创建播放列表。这可以通过将您的选择拖放到下一个 droplet 上来完成,您可以将其称为“VLC Playlist Creator”。 (或使用 Automator 将其变成“制作 VLC 播放列表”服务)。它将为您过滤重复项并打开 VLC.app.

的保存播放列表对话框
on open theAliases
    set {namesList, moviesList} to {{}, {}}
    repeat with i from 1 to count theAliases
        set anAlias to item i of theAliases
        tell application "Finder" to set theName to name of anAlias
        if not (namesList contains theName) then
            set end of namesList to theName
            set end of moviesList to anAlias
        end if
    end repeat
    -- try to restart "VLC" to clear old playlist
    if running of application "VLC" then quit application "VLC"
    repeat while running of application "VLC"
        delay 0.1
    end repeat
    -- add movies to playlist
    tell application "VLC"
        open moviesList
        stop
        activate
    end tell
    -- save playlist dialog
    tell application "System Events" to keystroke "s" using command down
    tell application "VLC" to activate
end open