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

An AppleScript to hide extensions via drag and drop Desktop
The recent discussion on hiding a file's extension led me to write this AppleScript:

on open (ItemList)
  set FileList to {}
  set FolderList to {}
  tell application "Finder"
    repeat with thisItem in ItemList
      if kind of thisItem is "folder" then
        copy thisItem to end of FolderList
      else
        copy thisItem to end of FileList
      end if
    end repeat
  end tell
  
  my processFiles(FileList)
  repeat with thisFolder in FolderList
    my splitFoldersFromFiles(thisFolder)
  end repeat
end open

on splitFoldersFromFiles(inputFolder)
  tell application "Finder"
    my processFiles(get files of inputFolder)
    set FolderList to folders of inputFolder
    repeat with thisFolder in FolderList
      my splitFoldersFromFiles(thisFolder)
    end repeat
  end tell
end splitFoldersFromFiles

on processFiles(FileList)
  repeat with thisFile in FileList
    tell application "Finder"
      set extension hidden of thisFile to true
    end tell
  end repeat
end processFiles

Save it as an application, and it will become a droplet. Simply drag files and/or folders containing files whose extension you wish to hide onto the droplet, and they'll be hidden.
    •    
  • Currently 3.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[10,560 views]  

An AppleScript to hide extensions via drag and drop | 3 comments | Create New Account
Click here to return to the 'An AppleScript to hide extensions via drag and drop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to hide extensions via drag and drop
Authored by: kL on Apr 11, '06 09:13:02AM

Can it hide all .app in Tiger?



[ Reply to This | # ]
hiding .app extensions
Authored by: sjk on Apr 11, '06 06:41:54PM

I never see .app extensions with "Show all file extensions" under "Finder > Preferences > Advanced" unchecked.



[ Reply to This | # ]
An AppleScript to hide extensions via drag and drop
Authored by: Swordfish on Apr 11, '06 11:57:21AM

Thanks you very much for this script!! I've been trying to do a script like that for a long time, but I'm not so good with AppleScript.



[ Reply to This | # ]