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
Post a Comment