Created
March 18, 2022 21:20
-
-
Save juandesant/ee3aa32ac1810005a450f2ae8cc9f1a3 to your computer and use it in GitHub Desktop.
Uses AppleScript to reveal all files within a hierarchy, using the frontmost folder in the Finder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Finder" | |
-- get the folder that corresponds to the foremost Finder Window | |
set theFolder to the folder of the first window | |
-- alternatively, you could choose a folder with the form below | |
-- set theFolder to (choose folder) | |
-- get justTheFiles by using the every item of ... whose ... construct | |
set justTheFiles to every item of the (entire contents of theFolder) whose kind ≠ "Folder" | |
-- reveal them opens up new folders of each directory and subdirectory in the hierarchy below the current folder | |
reveal justTheFiles | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment