Getting file suffix
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