Hello guys I had a simple automator/script to copy one file to another folder, but since the last update of the system (I am using Mojave 10.14.6 with my MacPro), the action will always time out and nothing happens.

on run {input}
tell application "Finder"
    copy file (item 1 of input) to folder (item 2 of input)
end tell
end run

The input is:

{alias "Watch_Folders:QC:Audio_Video:THEMYSTERYOFHENRIPICK_SOFA_20200910_3185:ElMisterioPick_TLR_F_FR-ES_INT_51_2K_2019-07-15_OV-Reel 1-SOFALAB.mov", "/Volumes/RAID-QC01/SOFA DIGITAL/JOBS/QC/MATEUS/THEMYSTERYOFHENRIPICK_SOFA_20200910_3185"}

The goal

For further clarification, what this script does is taking whatever file is selected on the company's server and:

  1. Look for the parent folder (it is the vendor id of the job) and extract it
  2. Creates a folder on my local HD using the vendor id.
  3. Copy the file to the folder.

enter image description here

So the step one is saving the file's name/location: enter image description here

Extracting the folder's name: enter image description here

Saving the folder's name (PASTA means folder in portuguese) enter image description here

Step two, creates the new folder: enter image description here

Saves the new folder as the destiny: enter image description here

Recall the file name/location enter image description here

Recall the destiny, adding it to the input pool: enter image description here

Step three, copy the file: enter image description here

Everything goes fine until the last bit. If you think the action should be AppleScript only, I will be happy to delete all the steps, I just don't know how to write it myself.

  • 1
    Do other files work okay or Is it only this file? What type of Automator workflow is it and how is the Run AppleScript action actually receiving its input? Have you tried using System Events instead of Finder to copy the file? – user3439894 Oct 5 '20 at 15:59
  • @user3439894 the workflow takes whatever file is selected. It is a service sending files/forlders to Finder. I could just use Automator Actions but then it won't show the progress bar. It used to work but now it keeps frozen until time out. What I noticed is the input is mixed with HSF and Posix. I am not sure it was like that before. Using System Events will render an error: Can’t make alias "Watch_Folders:QC:Audio_Video:THEMYSTERYOFHENRIPICK_SOFA_20200910_3185:ElMisterioPick_TLR_F_FR-ES_INT_51_2K_2019-07-15_OV-Reel 1-SOFALAB.mov" into type integer.” – Mateus Ribeiro Oct 5 '20 at 16:48
  • @user3439894 I added "as String", like copy file (item 1 of input as string) to folder (item 2 of input as string), and now the error is: The action “Run AppleScript” encountered an error: “System Events got an error: Files can not be copied.” – Mateus Ribeiro Oct 5 '20 at 17:02
  • @user3439894 I edited the question to show all the steps. – Mateus Ribeiro Oct 5 '20 at 17:28

You must log in to answer this question.

Browse other questions tagged .