Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Select similar files in a Finder window via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Select similar files in a Finder window via AppleScript
Authored by: tedw on May 07, '10 09:31:16AM
just a tweak on the original script: this script locates the active window - including the desktop - more reliably, and allows choosing more than one type of file by selecting 2 or more different file types in the Finder Window.
tell application "Finder"
	set the sourceFolder to insertion location
	set selectionList to selection as list
	if selectionList is not {} then
		set extensionList to {}
		repeat with thisFile in selectionList
			if name extension of thisFile is not in extensionList then
				set end of extensionList to name extension of thisFile
			end if
		end repeat
		select (every item of sourceFolder whose name extension is in extensionList)
	end if
end tell


[ Reply to This | # ]