AppleScript No Longer Works

I had a perfectly good automator script which has been working for a year or two, then it all of a sudden no longer works.
The Automator script created a service so when I right-click on a file name, it copies it into a Backup folder off of whatever the current folder is, then renames it to include the date. This script was on my right-click context menu, but now it’s gone.

I know… there’s an automator forum. But the automator script contains a step which runs AppleScript, so I thought this was a good place to start. This script now returns an error when I try to run it:

on run {input, parameters}
   
    tell application "Finder"
        set output to (container of item 1 of input) as alias
    end tell
    return output
end run

Model: macbook pro
AppleScript: unknown
Browser: Internet Explorer 10.0
Operating System: Mac OS X (10.10)

Hey There,

There’s nothing especially odd about that code, but it depends upon what the value of input is.

What is the actual value for input?

Submitting bits and pieces of a larger system that is failing makes it very difficult to troubleshoot the larger system.

You are right. It said the AppleScript had an error so I posted it here with only that info. In this case input is the name of the file I right-clicked on. I guess I should post the entire Automator script on that forum.

It doesn’t seem easy to post Automator code as I can’t figure out how to copy and paste it.

Thanks anyway.

Hey There,

All you need to do is zip the Automator action (service or workflow) and post a link to the file.

You can use Dropbox or other file-hosting service to host the file.