• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Show/Hide extension
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Show/Hide extension


  • Subject: Show/Hide extension
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 13 May 2008 20:50:46 -0700

The only way I've been able to find to hide or show the extension of a file, on a file-by-file basis, is to do it in the Get Info window.  I wrote a simple Applescript to do that, and put it in the script menu, but I think that having it as a contextual menu would be easier to use it.

Is there a way to make an Applescript into a contextual menu item?

Oh, here is the script:

tell application "Finder"
set foo to the selection
if class of foo is list then
repeat with bar in foo
my toggle(bar as alias)
end repeat
else
my toggle(foo as alias)
end if


end tell

on toggle(foo)
tell application "Finder"
set the extension hidden of foo to not the extension hidden of foo
end tell
end toggle

-- Michelle

-- 
"The past is like a foreign country.  They do things differently there."  --Leslie Poles Hartley

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Show/Hide extension
      • From: Rhet Turnbull <email@hidden>
    • Re: Show/Hide extension
      • From: Tim Mansour <email@hidden>
  • Prev by Date: Re: is iPhoto scriptable?
  • Next by Date: Re: Show/Hide extension
  • Previous by thread: Rép: Simple newbie question
  • Next by thread: Re: Show/Hide extension
  • Index(es):
    • Date
    • Thread