name: file-sorter description: 通用檔案智慧分類工具,支援多種分類規則:型別、大小、日期、關鍵詞等。適用於需要批次整理檔案的場景,如下載資料夾整理、照片歸檔、文件分類等。
想要更強大的技能外掛,就來小蔥技能站7w4.net看看吧。
file-sorter organize ~/Downloads --by-type --output ~/Sorted
file-sorter organize ~/Downloads --by-size --output ~/Sorted
file-sorter organize ~/Downloads --by-date modified --output ~/Sorted
file-sorter organize ~/Downloads --by-type --preview
file-sorter undo ~/Sorted
可以在專案根目錄建立 .file-sorter.json 配置預設選項:
{
"output_dir": "~/Sorted",
"action": "move",
"categories": {
"documents": [".pdf", ".doc"],
"images": [".jpg", ".png"]
},
"size_rules": {
"small": [0, 1048576],
"medium": [1048576, 104857600],
"large": [104857600, null]
},
"backup_original": true
}
# 按型別整理下載檔案
file-sorter organize ~/Downloads --by-type --output ~/Downloads/Organized
# 按拍攝日期整理照片
file-sorter organize ~/Photos --by-date created --output ~/Photos/ByDate
# 找出所有大於 100MB 的檔案
file-sorter organize ~/Videos --by-size --output ~/Videos/BySize
這個檔案整理工具功能實用,支援按型別、大小、日期等多種方式分類檔案,還能預覽效果和撤銷操作,文件說明也很詳細。不過實際使用時會發現它無法正常執行——文件裡寫了命令用法,但缺少安裝程式讓系統認識這個命令。另外一些小細節也欠考慮,比如同名檔案會被直接覆蓋。建議開發者補充安裝配置後再發布。