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>