Rico009
V2EX  ›  macOS

用 Automator 如何做到对文件夹的自动监控

  •  
  •   Rico009 · Aug 6, 2016 · 3807 views
    This topic created in 3745 days ago, the information mentioned may be changed or developed.

    之前在 Automator 里建了一个 folder action ,理论上可以自动对 downloads 文件夹里新添加的压缩包自动解压缩,在 Automator 里运行也是没问题的。 之后移动到 /Users/xxx/Library/Workflows/Applications/Folder Actions/ 的文件夹里,却无法做到自动监控,所以是哪里出了问题吗

    Supplement 1  ·  Aug 6, 2016
    workflow 是这样的
    11 replies  •  2016-08-08 21:31:27 +08:00
    kkxxxxxxx
    kkxxxxxxx
    Aug 6, 2016
    1
    权限?
    Rico009
    Rico009
    OP
    Aug 6, 2016
    2
    @kkxxxxxxx 呃能具体说下是哪里的权限吗😳
    Sylv
    Sylv
    Aug 6, 2016 via iPhone
    3
    这种需求建议用 Hazel ,会比较容易实现
    https://www.noodlesoft.com
    fatestigma
    fatestigma
    Aug 6, 2016
    4
    在 Automator 里能正常运行那就是有问题的吧, Automator 在运行 Folder Action 的时候会提示使用 Automator 测试需要使用 Get Specified Finder Items 来做调试,而最后保存的时候应该去掉这个测试 Action 改为例如 Filter Finder Items 之类。最好你可以把你的 Workflow 贴出来看看有没有问题。

    我测试了一下,我这里是没有问题的。
    Rico009
    Rico009
    OP
    Aug 6, 2016
    5
    @fatestigma 嗯我的意思就是 Get Specified Finder Items 后测试没问题,具体贴在了附言里,感谢
    Rico009
    Rico009
    OP
    Aug 6, 2016
    6
    @Sylv 太贵了,只为了这个不值得...
    zander
    zander
    Aug 6, 2016 via iPhone
    7
    hammerspoon , maid ,功能类似,免费。
    geeti
    geeti
    Aug 7, 2016
    8
    launchctl 可以监控文件夹,我觉得比 automator 好用
    idigital
    idigital
    Aug 7, 2016 via iPhone
    9
    文件夹上右键-文件夹操作-里面有监视文件夹的 AppleScript 实例
    RqPS6rhmP3Nyn3Tm
    RqPS6rhmP3Nyn3Tm
    Aug 7, 2016 via iPhone
    10
    用 pyinotify 多好
    Rico009
    Rico009
    OP
    Aug 8, 2016
    11
    @idigital 感谢,解决问题了🙏
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1735 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 12:29 · PVG 20:29 · LAX 04:29 · JFK 07:29
    ♥ Do have faith in what you're doing.