Hot answers tagged command-line
9
You can use the "Automatically Add to iTunes" folder for that (see HT3832):
cp song.mp3 ~/"Music/iTunes/iTunes Media/Automatically Add to iTunes/"
If iTunes is running, anything you copy into this folder will be imported into iTunes automatically (and deleted from the folder afterwards).
Please note:
The folder name might be language specific, so check ...
2
Get homebrew and have it install the core utilities. You can then see if the GNU version of cp supports the flags you desire. Here is a good answer on a partner site and I'll excerpt the exact steps you'll need to have cp be replaced by the GNU version if you wish:
Here's homebrew - http://mxcl.github.com/homebrew/
Here's the long story - ...
1
Check out duti:
duti is a command-line tool written by Andrew Mortensen, designed to set default applications for document types and URL schemes on Mac OS X.
Document types on Mac OS X are defined by what Apple calls Uniform Type Identifiers, or UTIs. HTML files, for example, have a UTI of public.html. Microsoft Word documents are described by the ...
1
Apoloiges for replying to an old question.
Thanks @koiyu for that code, it's confirmed working in Mountain Lion. However, if you're using multiple monitors, it only works on the first monitor. I slightly modified your code to make it work on all monitors.
tell application "System Events"
repeat with thisDesktop in every desktop
tell thisDesktop
...
Only top voted, non community-wiki answers of a minimum length are eligible