Automator & Preview: duplicate open file to specific folder

Dear all,


I'm starting to get into using the automator to build quick tasks. I thought about the following: In Preview, I have a pdf file open. I want to duplicate this pdf file and save it to a specific path on disc. The following code snippet is more or less the idea, however, doesn't work.


Any help would be highly appreciated.


Best,

Sebastian


on run {input, parameters}
	tell application "Preview" to ¬
		set pdfDoc to (path of front document)
	tell application "Finder" to duplicate pdfDoc to "path_to_folder" with replacing
end run

MacBook Pro 13″, macOS 12.2

Posted on Mar 15, 2022 6:07 AM

Reply

Similar questions

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator & Preview: duplicate open file to specific folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.