How to copy folder items on disk mount automator i want to automatically copy a specific folder's items when a usb is inserted at any given time. Program logic:


Once usb is available 
simply copy all content of (/Users/x/Documents/myfolder) to usb folder such as (/Volumes/BOSS/myfolder)
deletes copied contents from myfolder 


What software or scripts could do this?
One way to do this is to use Automator:


create a Folder Action on /Volumes 
trigger an Applescript or shell script when a new drive is mounted
do the copy
grab a coffee (optional). 


You'll probably want to scrape the output of system_profiler SPUSBDataType to make sure you're not messing around with DMGs.

Oooh, option 2 from stack overflow (copy/paste as a block quote below):


  You can use launchd for that purpose. Launchd can be configured
  to automatically launch a program when a file path is modified.
  
  For example the following launchd config plist will launch the program
  /usr/bin/logger when the desktop folder of my user account is
  modified:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;logger&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/bin/logger&lt;/string&gt;
        &lt;string&gt;path modified&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;WatchPaths&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/Users/sakra/Desktop/&lt;/string&gt;
    &lt;/array&gt;
&lt;/dict&gt;
&lt;/plist&gt;

  
  To activate the config plist save it to the LaunchAgents folder in
  your Library folder as "logger.plist".
  
  From the shell you can then use the command launchctl to activate
  the logger.plist by running:

$ launchctl load ~/Library/LaunchAgents/logger.plist

  
  The desktop folder is now being monitored. Every time it is changed
  you should see an output in the system.log (use Console.app).  To
  deactivate the logger.plist, run:

$ launchctl unload ~/Library/LaunchAgents/logger.plist

  
  The configuration file above uses the WatchPaths option.
  Alternatively you can also use the  QueueDirectories option. See the
  launchd man page for more information.