Applescript 文件夹操作支持更改/更改/更新的文件? [英] Applescript folder actions support for changed / altered / updated files?

查看:34
本文介绍了Applescript 文件夹操作支持更改/更改/更新的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否不存在更改文件夹项目时的文件夹操作?我希望我的脚本在我更新文件时运行.我在 文档.我是否缺少某种替代方案,因为没有这种接缝非常疯狂.

Does the folder action for when a folder item is changed not exist? I want my script to run when and if I update a file. I don't see any reference to it in the documentation. Is there some sort of alternative I am missing because this seams pretty crazy to not have.

on adding folder items to this_folder after receiving added_files
    do shell script "anything"
end adding folder items to

on removing folder items from this_folder after losing removed_files
    do shell script "anything"
end removing folder items from

-- does not exits?!?
on changing folder items in this_folder after updating changed_files
    do shell script "anything"
end changing folder items in

推荐答案

不,不直接存在.但是,类似的事情可以通过一个空闲处理程序来完成,该处理程序监视文件夹中的文件以查看它们的修改日期是否已更改,并在情况属实的情况下对文件执行操作.

Nope, doesn't exist directly. However, something similar could be accomplished with an idle handler that watches the files in the folder to see if their modification date has changed and perform an action on files where that's true.

这篇关于Applescript 文件夹操作支持更改/更改/更新的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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