Applescript in Final Cut Server
Hi all,
I am trying to get an applescript running from the final cut server. I wrote a script to replace all underscores and spaces in the filenames of a specific folder.
I've tested it local and it works like a charm. But when I attached the script to the folder via the final cut server host it wasn't working anymore.
Then I tried to link the script via the administrator panel in the Final Cut Server software. Response > Run an external script or command.
I'm not really that much of a scripter so now I'm having trouble finding the right command parameters. What should be defined in that line?
This is the script:
on adding folder items tothis_folderafter receivingthese_items
repeat with theFile in these_items
tell application "Finder"
set theFileName to name of theFile
end tell
set theFileName to my replace_chars(theFileName, "_", "-")
set theFileName to my replace_chars(theFileName, " ", "-")
tell application "Finder"
set name of theFile to theFileName
end tell
display dialogtheFileName
end repeat
end adding folder items to
on replace_chars(this_text, search_string, replacement_string)
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars
I would like to run this script to a folder on our SAN storage with the following path:
NCRV_XSan > FCS > Production > Afkijk_Gijs
What I would like to know now is how I specify the parameters for navigating to the above location.
All input is appreciated since I'm kind of a noob with scripting..
thanks in advance,
best regards,
Jan-David