Mac Automator - 组合PDF文件,保存在同一文件夹中 [英] Mac Automator - Combine PDF files, save in same folder

查看:464
本文介绍了Mac Automator - 组合PDF文件,保存在同一文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Automator来组合PDF文件,但是无法弄清楚如何将生成的文件自动保存到同一个文件夹。 (而是,它询问我在哪里放置文件。)



我正在使用它作为一项服务 - 这是我现有的工作流程:



1)服务接收所选的-PDF文件 - 在任何应用程序中 -

2)组合PDF页面[附加页面]

3)重命名Finder项目:名称单个项目[名称单个项目,仅Basename,TestResults]

4)移动Finder项目[到文件夹 - 在工作流运行时显示操作]



理想情况下,我会喜欢生成的文件:



- 根据(找到的文件夹)+(附加的静态字符串)命名

- 保存在文件夹的文件夹中



我已经看到人们获取和设置变量值的其他解决方案,但是当我尝试了,它似乎只是命名变量,而不是实际告诉程序在哪里获取值。



(在我的情况下,我正在创建一个名为folderPath的变量,并尝试将其传递给Move Finder Items操作。)

解决方案

没有自动操作可以获取文件容器的名称,也没有操作来获取文件容器的路径,以便您可以将它们设置为变量。所以,你必须使用Applescript动作才能获得每一个。这是一个工作自动化工作流程的例子,完成你所要求的工作,假设你把它放在接受PDF的服务中。






I'm using Automator to combine PDF files, but can't figure out how to automate saving the resulting file to the same folder. (Instead, it asks me where to put the file.)

I'm using it as a service - here's my existing workflow:

1) Service receives selected -PDF files- in -any application-
2) Combine PDF Pages [appending pages]
3) Rename Finder Items: Name Single Item [Name Single Item, Basename only, to "TestResults"]
4) Move Finder Items [to a folder - show action when workflow runs]

Ideally, I'd love the resulting file:

-- to be named based on (the folder where it's located) + (an appended static string)
-- saved in the folder where the files are


I've seen other solutions where people are Getting and Setting Variable Values, but when I've tried, it only seems that I'm naming the variables, not actually telling the program where to get the values.

(In my case, I was creating a variable called "folderPath" and trying to pass that along to the Move Finder Items action.)

解决方案

There is no automator action to get the name of a file's container, nor is there an action to get the path of a file's container, so that you can set those to variables. So, you'll have to use an Applescript action to get each of those. Here is an example of a working automator workflow accomplishing what you have asked, assuming you place it in your service that accepts PDFs.

这篇关于Mac Automator - 组合PDF文件,保存在同一文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆