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

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

问题描述

时是否一个文件夹项目更改该文件夹的动作不存在?我希望我的脚本运行的时候,如果我更新文件。我没有看到任何提及它的文档。是否有某种另类的我失踪,因为这接缝pretty疯狂到没有。

 关于添加文件夹项目收到added_files后this_folder
    做shell脚本东西
末尾添加文件夹项目在失去后removed_files从this_folder删除文件夹项目
    做shell脚本东西
从最终删除文件夹项目 - 不退出?!?
在更新后changed_files改变this_folder文件夹项目
    做shell脚本东西
结束更改文件夹的项目


解决方案

不,不直接存在。然而,看到类似的可与空闲处理程序,监视文件夹中的文件来完成的东西,如果他们修改日期发生了变化,其中,这是真的执行的文件的操作。

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天全站免登陆