V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
beayrdghkj
V2EX  ›  macOS

Mac 的文件分拣工具有推荐吗?

  •  
  •   beayrdghkj · 293 天前 via iPhone · 587 次点击
    这是一个创建于 293 天前的主题,其中的信息可能已经有所发展或是发生改变。
    请教一下,Mac 的文件分拣工具有推荐吗?需要把视频文件按照拍摄日期自动整理到不同的文件夹。看了 hazel 好像不太符合。

    谢谢!
    3 条回复    2021-10-21 22:30:48 +08:00
    minamike
        1
    minamike  
       293 天前
    http://hints.macworld.com/article.php?story=20090501221803809
    这个 applescript 可以
    ```
    tell application "Finder"
    set mifold to choose folder
    set filelist to every file of mifold as list
    set foldlist to every folder of mifold as list
    repeat with i from 1 to number of items in filelist
    set subj to item i of filelist as alias
    set epoch to (do shell script "stat -f \"%B\" " & (quoted form of (POSIX path of subj)))
    set caldate to do shell script ("date -r " & epoch & " \"+%Y-%m-%d\"")

    if not (exists folder caldate of mifold) then
    make new folder at mifold with properties {name:caldate}
    end if
    try
    (* try ignores errors from locked files *)
    move file subj to folder caldate of mifold
    end try
    end repeat
    repeat with j from 1 to number of items in foldlist
    set subj to item j of foldlist as alias
    if name of subj does not start with "200" then
    set epoch to (do shell script "stat -f \"%B\" " & (quoted form of (POSIX path of subj)))
    set caldate to do shell script ("date -r " & epoch & " \"+%Y-%m-%d\"")
    if not (exists folder caldate of mifold) then
    make new folder at mifold with properties {name:caldate}
    end if
    try
    (* try ignores errors from locked items *)
    move folder subj to folder caldate of mifold
    end try

    end if
    end repeat
    end tell
    ```
    DonDonc
        2
    DonDonc  
       293 天前
    使用 Automator,参考:sspai. com / post / 41801
    beayrdghkj
        3
    beayrdghkj  
    OP
       292 天前 via iPhone
    谢谢两位!
    关于   ·   帮助文档   ·   API   ·   FAQ   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   4278 人在线   最高记录 5497   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 08:59 · PVG 16:59 · LAX 01:59 · JFK 04:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.