简体   繁体   English

什么是用于移动/删除文件的AppleScript文件夹操作?

[英]What is the AppleScript Folder Action for moving/deleting a file?

I have a script that is working fine when I add a file to the folder using: 我使用以下命令将文件添加到文件夹时,脚本工作正常:

on adding folder items to this_folder after receiving added_items

What is the equivalent when a file is either moved or deleted from that folder? 从该文件夹移动或删除文件时的等效功能是什么?

Thanks! 谢谢!

This should work: 这应该工作:

=== edited to answer to comments: ===编辑回答评论:

on removing folder items from this_folder after losing lost_items
repeat with i from 1 to number of items in lost_items
    set nameOfLostFile to name of (info for item i of lost_items)
end repeat
end removing folder items from

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM