如何在 OS X 中標記隱藏目錄中的資料夾

如何在 OS X 中標記隱藏目錄中的資料夾

在 OS X 中,有沒有辦法標記隱藏目錄內的資料夾或標記隱藏目錄本身?

作為解決方法,我會建立這些資料夾的別名,並將它們放在可見的位置並標記別名,但標記的別名必須在自己的 Finder 視窗中開啟才能查看其內容,Finder 列視圖不顯示其內容。

答案1

將此腳本儲存為應用程式。

雙擊它可以顯示不可見的檔案。
根據需要標記。
再次雙擊可隱藏不可見物件。

set newHiddenVisiblesState to "YES"
try
    set oldHiddenVisiblesState to do shell script "defaults read com.apple.finder AppleShowAllFiles"
    if oldHiddenVisiblesState is in {"1", "YES"} then
        set newHiddenVisiblesState to "NO"
    end if
end try
do shell script "defaults write com.apple.finder AppleShowAllFiles " & newHiddenVisiblesState


tell application "Finder"
    set theWindows to every Finder window
    repeat with i from 1 to number of items in theWindows
        set this_item to item i of theWindows
        set theView to current view of this_item
        if theView is list view then
            set current view of this_item to icon view
        else
            set current view of this_item to list view

        end if
        set current view of this_item to theView
    end repeat
end tell

這不會改變桌面本身的直接可見性,只會改變 Finder 視窗。

要在 Spotlight 中尋找隱藏文件,您需要在搜尋參數中指定...

在此輸入影像描述

答案2

這比你想像的簡單!

  1. 建立您要標記的資料夾的捷徑
  2. 將捷徑移到隱藏資料夾之外的某個位置
  3. 標記快捷方式。

完成。

相關內容