Automator disk mount action

Discussion in 'Mac Apps and Mac App Store' started by TheMasin9, Mar 3, 2007.

  1. TheMasin9 macrumors 6502a


    Dec 22, 2004
    Huber Heights, OH
    Hey all,
    I have need for an action that detects a specific disk mounted (specifically a usb Flash drive) and then runs through a syncing workflow that syncs the contents of the flash drive with a specific folder on my computer (documents).

    Thanks in advance
  2. captainbeefheat macrumors regular

    Jan 21, 2006
    You mean a automated backup? Though sounds like you want it to happen whenever you plug it in not a certain time, so like an ipod or palm? I suspect you could do something like that with automator.
  3. TheMasin9 thread starter macrumors 6502a


    Dec 22, 2004
    Huber Heights, OH
    which action?

    yeah, im just looking for the action that can recognize a disk when it is plugged in, which can lead to the automatic opening of automator and runthrough of a syncing workflow then an ejection of the disk.
  4. robbieduncan Moderator emeritus


    Jul 24, 2002
    So you have this "syncing workflow" already available? Because that is non-trivial. In fact it's quite difficult.
  5. zweigand macrumors 6502a


    Oct 19, 2003
    If you are on a PPC machine I suggest you look into this app

    There is another way that involve AppleScript and folder actions that you can use ...but it's more complicated. You essentially attach a folder action to your /Volumes directory and have it look for a specific name to pop up in there.
  6. mimeya macrumors newbie

    Oct 13, 2010
    If you know the name of the disk....

    If you know the name of the disk.... you could use this Applescript to create a .scrpt file (and add it to the file action for the Volumes directory):

    on adding folder items to this_folder after receiving added_items
    		tell application "Finder"
    			set ref_added_items to a reference to added_items
    			repeat with n from 1 to count of added_items
    				set x to item n of added_items
    				if (x as text) contains "DiskName" then
    					-- do stuff
    				end if
    			end repeat
    		end tell
    	end try
    end adding folder items to

    This thread was started a while back and is pretty dead, but hope this helps someone..... :)

Share This Page