• 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
Getting file suffix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting file suffix


  • Subject: Getting file suffix
  • From: LuKreme <email@hidden>
  • Date: Mon, 13 Sep 2010 04:27:19 -0600

I have a folder action I'm working on where I am trying to get the suffix of a file name that has been dropped into the folder

I have the following bit of code in the main routine:

display dialog "Getting File Suffix"
if this_item contains "." then
	set oldDelims to AppleScript's text item delimiters
	set AppleScript's text item delimiters to "."
	set item_suffix to text item -1 of this_item
	set AppleScript's text item delimiters to oldDelims
end if
display dialog "Suffix is " & item_suffix

I get the first dialog, but not the second, and the script appears to have stopped at this point as no further processing occurs.

The only thing that I see in console.app is

/System/Library/CoreServices/AppleScript Runner.app/Contents/MacOS/AppleScript Runner[95306]	CPSGetFrontProcess(): This call is deprecated and should not be called anymore.

Since it's in a folder action, I don't know of anyway to trace its events and replies in script editor.

tempted to rewrite the whole thing as a bash script with a UserAgent...

--
We will fight for Bovine Freedom and hold our large heads high We will
run free with the Buffalo or die

 _______________________________________________
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: Getting file suffix
      • From: Steve Thompson <email@hidden>
    • Re: Getting file suffix
      • From: KOENIG Yvan <email@hidden>
    • Re: Getting file suffix
      • From: Robert Poland <email@hidden>
    • Re: Getting file suffix
      • From: AndrĂ© Renault <email@hidden>
    • Re: Getting file suffix
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Dialog question
  • Next by Date: Re: Getting file suffix
  • Previous by thread: Re: Dialog question
  • Next by thread: Re: Getting file suffix
  • Index(es):
    • Date
    • Thread