【问题标题】:Automator: Change modification date of selected finder itemsAutomator:更改所选查找器项目的修改日期
【发布时间】:2015-05-08 00:25:13
【问题描述】:

我想创建一个自动化服务来将所选查找器文件的修改日期更改为当前日期。我从哪里开始?

【问题讨论】:

    标签: date automator finder


    【解决方案1】:

    创建 Automator 服务:

    在“Finder”中将弹出窗口设置为“文件或文件夹

    添加“Run Shell Script”动作,将弹出窗口设置为“/bin/bash”和“as arguments”。

    将此脚本放入动作中:

    d=$(date  "+%Y%m%d%H%M.%S") ## the formatted current date
    touch -t $d "$@" ## change the file's modification date
    

    保存工作流程,仅此而已。

    【讨论】:

      猜你喜欢
      • 2014-07-11
      • 1970-01-01
      • 1970-01-01
      • 2020-12-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多