Automator disk mount action

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

  1. TheMasin9 macrumors 6502a

    TheMasin9

    Joined:
    Dec 22, 2004
    Location:
    Huber Heights, OH
    #1
    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

    Joined:
    Jan 21, 2006
    Location:
    UK
    #2
    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

    TheMasin9

    Joined:
    Dec 22, 2004
    Location:
    Huber Heights, OH
    #3
    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

    robbieduncan

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

    zweigand

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

    http://www.macupdate.com/info.php/id/10881

    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

    Joined:
    Oct 13, 2010
    #6
    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):

    Code:
    on adding folder items to this_folder after receiving added_items
    	try
    		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..... :)

    mimeya.com
     

Share This Page