I have AppleScript that I have already developed. It allows you to choose a folder, loops through all of the movies in that folder, automatically trims each movie to a set amount, then Exports to a chosen folder. It works -- except, when running each file gives me the error:
You don't have permssion to save file...
I have repaired permissions on the drive, and tried a bunch of different code. I can't fix it.
I need you to get the script running on my computer. If you send me code, I can test it and see if it works. My code is attached.
Hi,
Are you sure that you have the permissions to save into the folder you select?
Check the permissions in Finder > Select the folder > Info.
Kind regards,
Mike
Hi patrickoleary,
Your script works just fine. It looks like the destination folder you are selecting doesn't have write/modify permissions.
Please try saving to your Desktop or Documents folder for a sample file.
Edit: Please try script below to display the permissions of your destination folder.
set secondsFromStart to 3.5
set secondsFromEnd to 3.5
set srcFolder to choose folder
set dstFolder to choose folder with prompt "Choose the destination folder for the trimmed files." default location srcFolder
set documentName to text
tell application "Finder"
set fileList to files of folder srcFolder
end tell
repeat with f in fileList
tell application "QuickTime Player"
open f
set documentName to name of f
delay (1.0)
tell document 1
if duration > 7 then
trim from secondsFromStart to (duration - secondsFromEnd)
display dialog "Destination folder is " & (POSIX path of dstFolder)
display dialog (do shell script "ls -ld " & POSIX path of dstFolder)
export in file ((dstFolder as text) & documentName) using settings preset "480p..."
close saving no
delay (1.0)
else
close saving no
delay (1.0)
end if
end tell
end tell
end repeat