Automatically launch an Applescript on a USB when that USB is plugged in? -


i'm making application stored on usb. when usb plugged in, app (on same usb) should automatically search hard drive files name , transfer them usb. know how find files , move them, need know how automatically run application. can help?

code finding files if needs (credit user vadian):

set startupdisk posix path of (path startup disk) set endlocation posix path of ((path me string) & "contents:resources") set filename "pdffilename.pdf" string  shell script "mdfind -onlyin " & quoted form of startupdisk & " -0 'kmditemdisplayname = \"" & filename & "\"' | xargs -0 -j {} cp {} " & quoted form of endlocation 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -