Automator或Applescript,在文件夹中检测到新文件 [英] Automator or Applescript, detect a new file in folder
问题描述
我正在尝试写一些东西来检测特定目录中的新文件.我最好希望该脚本无限期地继续运行,每当我看到一个新文件时,都可以将其复制并移动到其他位置.我知道这是必须的,因为dropbox可以做到,但是我只是不知道如何使它工作或从哪里开始.有什么想法吗?
I am trying to write something that will detect a new file in a certain specified directory. I preferably would like this script to continue running indefinitely, and whenever I see a new file, I can copy it and move it somewhere else. I know this has to be possible, because dropbox does it, but I just do not know how to get this working or where to start. Any ideas?
推荐答案
您要查找的内容(在将新文件添加到热文件夹"中时生成Applescript)称为文件夹操作",其中有一个可以在线找到的教程数量应该会为您指明正确的方向.
What you're looking for (to spawn off Applescripts when adding new files into a "hot folder") is called "Folder Actions", and there are a number of tutorials that can be found online that should point you in the right direction.
例如,这是一个:"AppleScript:探索文件夹操作的力量,第一部分"
这篇关于Automator或Applescript,在文件夹中检测到新文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!