【问题标题】:AppleScript - finding creation/modification dates for filesAppleScript - 查找文件的创建/修改日期
【发布时间】:2011-02-05 11:43:10
【问题描述】:

我有一个简单的服务用于导入 Evernote 文件:

在运行{输入} 告诉应用程序“印象笔记” 在输入中重复 x 尝试 从文件 x 创建注释 关于错误 error_message number error_number 显示警报“发送到 Evernote 失败”消息“错误:”&error_message &“”和“错误编号:”&error_number 作为警告 结束尝试 结束重复 结束告诉 结束运行

我想“从文件 x 创建的 d 创建注释”,其中 d 是与原始文件匹配的日期/时间 - 但我不知道如何获取日期/时间(创建或修改) 的原始文件,格式为 applescript 日期。

感谢您的帮助!

【问题讨论】:

    标签: date time timestamp applescript evernote


    【解决方案1】:

    我不知道你从哪里得到你的“输入”,但假设“文件”你的字面意思是 Finder 中的文件,调用 Finder 来获取“输入”中文件的信息应该像这样:

    tell application "Finder" to set input to selection
    repeat with x in input
        tell application "Finder" to set creationDate to creation date of x  
    end repeat
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-02
      • 2016-12-09
      • 1970-01-01
      • 2022-11-09
      • 1970-01-01
      • 1970-01-01
      • 2012-11-09
      • 1970-01-01
      相关资源
      最近更新 更多