Folder Actions for OS X explained - with real-world examples文件夾的行動為OS X的解釋-與真實世界的例子

by Ross McKillop on January 30, 2007 Ross麥基洛普 2007年1月30日

陸委會

What are Folder Actions? 什麼是文件夾的行動?

In a nutshell, Folder Actions are scripts that can be attached to folders.在簡單來說,文件夾的行動是劇本,可以附加文件夾。 They enable events (actions) to take place when items are added or removed from that folder.他們使事件(行動)採取地方項目時,添加或刪除從該文件夾。 Events can also occur when the folder is opened, closed or moved.事件也可以發生時,該文件夾的打開,關閉或遷移。

Real-World Examples 真實世界的例子

  • When you put images in a certain folder, they’re automatically converted to JPG當你把圖像在某一個文件夾,它們會自動轉換為JPG格式
  • When you put files in a certain folder, they’re automatically uploaded to a web server當你把文件在某一個文件夾,它們會被自動上傳到網絡服務器
  • When you close a Finder window, all the sub-folder windows close as well當您關閉一個Finder窗口,所有的子文件夾的Windows關閉,以及
  • When new files are placed in a certain folder, you’re notified當新的文件都放在在某一個文件夾,您通知
  • When new files are placed in a certain folder (like your Desktop or download folder) they’re moved based on file type當新的文件都放在在某一個文件夾(如您的桌面或下載文件夾) ,他們正在動議的基礎上的文件類型
  • See more in the看到更多的,在 Folder Action Resources文件夾的行動資源 section
  • How to enable and use Folder Actions 如何啟用和使用文件夾操作

    1. For this example we’ll create a Folder Action that converts images to JPG format just by dropping them into a folder (this particular Folder Action is included with OS X).在這個範例中,我們將創建一個文件夾的行動,轉換圖像,以JPG格式只要拖放到一個文件夾(這個文件夾的行動,特別是包括與OS X的) 。 Start by creating a new folder.首先,創建一個新文件夾。
    2. Now right-click (ctrl-click) on that new folder and select Enable Folder Actions現在,右鍵單擊(按CTRL點擊)就認為,新的文件夾,然後選擇啟用文件夾的行動


    3. click to enlarge點擊放大

    4. Again, right-click (ctrl-click) that same folder and this time select Attach a Folder Action…再次,右鍵單擊(按CTRL點擊)表示,同一文件夾中,這一次選擇附加一個文件夾的行動…


    5. click to enlarge點擊放大

    6. You’ll probably be presented with a list of scripts.可能會提交一份清單,腳本。 If you’re not, you’ll need to navigate to the folder that contains all of the Folder Action scripts.如果您不是,您需要瀏覽到該文件夾包含所有文件夾的行動腳本。 They’re in Mac HD/Library/Scripts/Folder Action Scripts/.他們在Mac房署/圖書館/腳本/文件夾的行動腳本/ 。 Select Image - Duplicate as JPEG and then click Choose選擇圖像-重複時如同J PEG文件,然後單擊選


    7. click to enlarge點擊放大

    8. That’s it.就是這樣。 Now drag a non-jpg picture into that folder (a PNG, GIF etc).現在拖動一個非JPG格式圖片到該文件夾中(一巴紐, GIF和等) 。
    9. Ta-da!電訊管理局局長達! The Folder Action will have duplicated your image, but this time as a JPG.該文件夾的行動將有重複您的形象,但這個時候,作為一個JPG 。 It will also save the original image.它也將保存原始圖像。


    10. click to enlarge點擊放大

    11. If you ever want to change or disable a Folder Action, right-click (ctrl-click) the folder and choose Configure Folder Actions…如果您想改變或禁用一個文件夾的行動中,右鍵單擊(按CTRL點擊)文件夾,並選擇配置文件夾的行動…
    12. From here you’ll be able to manage all of your Folder Actions in one place.從這裡您可以管理您所有的文件夾操作在同一個地方。

    Folder Action Resources 文件夾的行動資源

    Here are some sites that provide pretty cool Folder Action scripts etc -這裡有一些網站提供很酷的文件夾的行動腳本等-

  • Auto-sort files dropped into the System Folder (like OS 9)自動排序的檔案下降到系統文件夾(如OS 9的)
  • Automatically add/import files to iTunes when they’re placed in a folder自動添加/導入文件到iTunes當他們放置在一個文件夾
  • Upload files using Cyberduck when they’re placed in a folder上傳文件使用cyberduck當他們放置在一個文件夾 (Upload Sample.scpt) - read the readme.txt for more info (上傳sample.scpt ) -閱讀R eadme.txt更多信息
  • Use Folder Actions and Automator to keep your Desktop super-clean使用文件夾的行動和Automator使您的桌面超級清潔
  • Automatically import (and tag) Photo Booth photos into iPhoto自動導入(和標記)的Photo Booth照片到iPhoto
  • Writing Folder Action scripts書面文件夾的行動腳本
  • [ digg ] [ del.icio.us ] [臉譜] [ Google ]在
    Related Posts: 相關文章:
  • An introduction to Real Desktop - a Windows Desktop replacement介紹了真正的桌面-W indows桌面更換
  • Review: Apogee Search檢討:遠地點搜索
  • Roundup: The Under-appreciated Posts綜述:下讚賞職位
  • How to add commands to the OS X “right-click” menu如何添加命令到OS X的“滑鼠右鍵”菜單
  • Best of Blog Action Day最好的博客行動天
  • { 6 trackbacks } 6 trackbacks

    Jay’s Headspace - » Eager Beaver for 01/31/2007傑伊的頂-»渴望的河狸為2 007年1月3 1日
    02.04.07 at 9:22 pm 02.04.07在下午9點22分
    Folder Action for automated upload of Aperture web galleries at The Joy of Scripting文件夾的行動,自動上載的光圈的Web照片畫廊在喜悅的腳本
    11.30.07 at 11:59 pm 11.30.07在下午11時59分
    Final Cut Producer | Mac Folder Actions Explained的Final Cut生產者|陸委會文件夾的行動解釋
    03.04.08 at 6:19 am 03.04.08在上午06時19分
    Looky: An AppleScript Folder Action utilizing Quick Look at The Joy of Scripting looky : 1的AppleScript文件夾的行動,利用就讓我們來看看它的喜悅腳本
    03.28.08 at 12:59 am 03.28.08在上午12時59分
    AppleScript ::: Ignorantenprogramm released | macfidelity的AppleScript : : : ignorantenprogramm發表| macfidelity
    03.30.08 at 5:03 am 03.30.08在上午05時03分
    Folder Actions for OS X explained (with real-world examples) | The Pengas Blog文件夾的行動為OS X的解釋(與真實世界的例子) | pengas博客
    08.11.08 at 4:29 am 08.11.08在上午04時29分

    { 12 comments… read them below or 12評論…閱讀他們或低於 add one新增1 }

    1 1 JP 01.31.07 at 3:52 pm 太平紳士 01.31.07在下午3時52分

    cool涼爽的

    2 2 Filip Lam 菲利普林 01.31.07 at 7:34 pm 01.31.07在下午7點34分

    Wonderful tip!精彩的秘訣! I’ve been wondering what folder actions was about but never really had the time to figure it out.我已經不知道是什麼文件夾操作約,但從來就沒有真正有時間,去揣摩吧。 Thanks again!再次感謝!

    3 3 UT 01.31.07 at 11:29 pm 01.31.07在下午11時29分

    I wish all tutorials were this clear!我想所有的教程被這清楚! Excellent tip!!!優良的秘訣!

    4 4 Nick 尼克 01.31.07 at 11:42 pm 01.31.07在下午11時42分

    JP, Filip and UT -太平紳士,菲利普和UT斯達康-

    Glad to hear it helped!!很高興聽到它幫助!

    5 5 Hani 02.16.07 at 7:35 am 哈尼族 02.16.07在上午07時35分

    Thanks for the great tip.感謝偉大的秘訣。 Is there a way for the music or movie folders to search the computer and add music/videos automatically?有沒有辦法為音樂或電影文件夾,搜索電腦及添加音樂/視頻自動?

    6 6 Andy 安迪 10.06.07 at 5:38 pm 10.06.07在下午5時38分

    Great tutorial, this will help me out big time with workflow on my mac.偉大的補習,這將有助於我趕出大的時間與工作流程我的Mac上。

    7 7 Murphy 墨菲 11.13.07 at 9:24 pm 11.13.07在下午9點24分

    Good info, thanks.良好的信息,表示感謝。

    Here’s how to make a folder that mails files added to it to a preset address, useful for backing them up to Gmail.這裡的如何使文件夾中的郵件文件添加到它預設的地址,有用的後盾,他們到Gmail 。

    http://murphymac.com/files-mailed-magically-when-dropped-in-a-finder-folder/

    8 8 damn.hustle 12.10.07 at 2:36 pm damn.hustle 12.10.07在下午2時36分

    thank you very much.非常感謝。 You gave an easy explanation.你給一件容易的解釋。

    9 9 Muthu muthu 06.18.08 at 6:05 am 06.18.08在上午06時05分

    Awesome.可怕的。 Simple example which i was waiting to go though in years.簡單的例子,我正在等待去,雖然在年。

    10 10 Emilio Marte 06.25.08 at 12:37 pm 埃米利奧marte 06.25.08在下午12時37分

    Saludos: saludos :

    Por favor me gustaría que alguien me diga, cómo puedo hacer para que cuando alguien coloque un archivo en un folder cualquiera, que este me notifique o que se active si el mismo está abierto.每間房有利於我gustaría闕alguien我diga ,如何購買puedo hacer第闕cuando alguien coloque聯合國文件為英文聯合國文件夾cualquiera ,闕埃斯特我notifique o闕硒積極矽下午mismo está abierto 。

    Gracias de antemano格拉西亞德antemano

    11 11 Emilio Marte 06.25.08 at 12:40 pm 埃米利奧marte 06.25.08在下午12時40分

    Please I would like to see someone tell me, how can I do so that when someone put a file in a folder anyone, I notice that this or that is activated if it is open.請我想看到有人告訴我,我如何能這樣做,當有人提出一個文件在一個文件夾中的人,我察覺到這個或那個被激活,如果它是開放的。

    Thanks in advanc感謝在advanc

    12 12 frank 坦率 07.04.08 at 11:49 pm 07.04.08在下午11時49分

    Ok i give you thumbs up!確定我給你豎起大拇指!

    Leave a Comment留下意見

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用這些HTML標記和屬性:的<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <del datetime="">的<em>的<i> <q cite=""> <strike>的<strong>