Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Automate your Mac: four smart hacks for managing files

Christopher Breen, Matt Gemmell, Joe Kissell, Brett Terpstra | Sept. 2, 2014
Managing files and folders is one of the most obvious--and easiest--chores to automate on your Mac, thanks to specialized tools like Hazel, as well as generalists like AppleScript, Automator, and Keyboard Maestro.

Managing files and folders is one of the most obvious — and easiest — chores to automate on your Mac, thanks to specialized tools like Hazel, as well as generalists like AppleScript, Automator, and Keyboard Maestro.

Clear the desktop

Tool: AutomatorI'm one of those people who litters his desktop with files throughout the day. I've created an Automator workflow that moves these files to a Desktop Moved folder I've created within my Documents folder. To create, I opened Automator, and selected Calendar Alarm as the type of document. I then added the following actions, in order: Get Specified Finder Items (adding my Desktop folder to its list); Get Folder Contents; Move Finder Items (specifying my Desktop Moved folder as the target). I set up this alarm to go off every Sunday at 5:00 p.m., so I can start my work week the next morning with a clean desktop. — Christopher Breen

Getting public Dropbox link for selected file

Tool: Keyboard MaestroI often want to quickly share a selected file in the Finder via Dropbox, by moving that file to my Dropbox's Public folder and then obtaining the Dropbox link to the uploaded copy. So I created a Keyboard Maestro macro to automate the process. Yes, you can do this with the Dropbox Mac app, but that requires first moving the file into your Dropbox folder, then using the Dropbox menubar icon (or the Dropbox Web interface) to obtain the link. There are also some other third-party utilities that'll collect Dropbox links, but I like the flexibility Keyboard Maestro gives to, say, chain multiple macros together — for example, so with one macro I can take a screenshot of the frontmost window then automatically put it in Dropbox.

The first step selects the file, using the For Each action, specifying Path in the For Each drop-down and adding the collection The Finder's Selection. There follow four actions: Move (or Rename the File (opting to move the file %Variable%Path% to the folder ~/Dropbox/Public); Filter Variable to obtain just the filename (selecting the variable Path from the drop-down and Last Path Component from With); copying the Dropbox path to the clipboard with Set Clipboard to Text (setting Set to System Clipboard and To to Plain Text, then entering the path to your public Dropbox folder, followed by %Variable%Path%); and, finally, Notification (with the title Dropbox link copied, the message set to the token Current Clipboard).

Note that, for that third action, you can get the base URL for your Dropbox's Public folder by putting a file into your Public folder and then using either the Dropbox menubar icon or the Web interface to get a sharing link. Strip off the filename part at the end, and you've got your own unique base link to use in the macro. — Matt Gemmell

 

1  2  Next Page 

Sign up for CIO Asia eNewsletters.