Moving files, location specifier error

Hello everyone, my first post.

I want to move an image file to Capture One’s own session Trash folder. I can get the path to Trash but my script stops with Applescript message:

What is the right way to give the path to Trash?

tell application "Capture One"
	set pathToTrash to (get trash of document 1)
	set selectedImage to (get parent image of (get item 1 of (get selected variants)))
	move (id of selectedImage) to pathToTrash -- fails
end tell

Thanks,
Sam

Just saw you post

tell application "Capture One 9"
	set pathToTrash to (get trash of document 1)
	set selectedImage to (get id of parent image of (get item 1 of (get selected variants)))
	do shell script "mv" & " -f " & quoted form of selectedImage & space & quoted form of POSIX path of pathToTrash
end tell

does the job

Thanks for the code! I’ll try it :slight_smile:
Do you know how to move the image with Capture One (so that also the associated settings files would follow)?

Sam

No and I’m not sure that Capture One can do it via applescript ateast in v9, v10 might be able to. Its reasonably straightforward to move the settings files with a couple more shell calls.

Capture One 9 has move in dictionary:

If I change your do shell script line to:

	move selectedImage to pathToTrash -- fails

…I get now the error:

This time the path is unix-style. What might be the right syntax for the object and location specifiers?