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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -