•
Folder Actions Via SSH - Retrieving Files on Your Mac From a PC
You’re going to be away from your Mac for the holiday weekend? What if you need some important files from your G5 while you’re gone? What if you only have access to a PC at Aunt Millie’s house?
We’ve still got ways to connect and retrieve files. Like using SSH to mail an attachment from a remote machine. You don’t need a screencast, Murphy’s already given you all the pieces.
First, set up a Folder Action on the machine you’ll be connecting to via SSH. Murphy has a screencast on sending email attachments to a predetermined address. Make sure your router lets port 22 in. You can learn more about port forwarding in the screencast on VNC.
Then you can make an SSH connection to the computer from just about anywhere. Use the zip command to package up multiple files if you’re not just emailing a lone file. Copy the file to your Folder Action equipped folder using SSH. The Folder Action will still kick in and email the file for you.
Obviously there are tools like rsync and scp - but of your needs are specialized a Folder Action could be your cure.
If you need to SSH from a Windows machine download PuTTY. PuTTY’s single exe is a snap to use. You should probably have a copy on your thumb-drive for convenient access.
Using PuTTy isn’t exactly the same as running a Terminal session on your Mac. For instance, you can’t use rsync to copy files from the PC to the remote Mac. If transferring files is a pressing need you can take a look at PSFTP and PSCP.
Here are the posts with information relevant to the task:
With the information in those screencasts you can extend the power of Folder Actions to SSH. Murphy’s not saying you’ll want to use this to email files - it’s just an example to illustrate the possibilities.
Some readers have pointed out that an Automator Droplet might be more useful than Folder Actions for mailing files. But you can’t trigger the Droplet from an SSH session like you can with Folder Actions. The Droplet has its benefits, but so do Folder Actions.
|
Permalink
•

The Crazy Message Text script comes with OS X so you can make some festive looking emails for birthdays or holidays. But the finished product conjures up images of letters cut from a magazine and taped to a piece of paper. Like a ransom note from a James Patterson novel.
The script is fairly self-explanatory but Murphy’s throwing in a screencast anyway, in case you’re away from your Mac. It’s quick, take a look.
You’ve got other scripts in your /Library/Scripts/Mail Scripts folder - give them a peek - maybe there’s something you could use.
Note: The script generates a multi-color message, not something like the image in this post. Click the image above to generate your own classic-style ransom note.
Watch Now
|
Permalink
•
You’d think this soon after wrapping iTunes week we’d be done with iTunes. But there’s one more script to take a look at before we put the jukebox on the back burner for a while.
Do you remember the days before iTunes and iPods when you listened to Double Shot days on the radio? Block Parties with three or four songs in a row by the same group?
The Block Party script generates a somewhat random playlist that includes multiple songs by each included artist. How many songs? That’s up to you. How big is the list? You can specify a number of artists or a duration. The download includes a readme with more information, like how to change the name of the playlist the script creates.
The script comes from Doug’s AppleScripts for iTunes - a site we visited last week.
Murphy is feeling nostalgic for Double Shot Tuesdays on WMMR in Philadelphia. You?
Watch Now
|
Permalink
•

iTunes lets you access songs shared on a remote computer. But it’s sort of a one-way relationship. You can’t edit the playlists or copy the actual song files between computers. Unless you get a little help.
Downloading the Remote Management Scripts provides more functionality. The scripts act on tracks you’ve selected in a shared library. Then they use mechanisms like Personal File Sharing and Remote Apple Events to copy or edit those tracks. Or edit the playlist. There’s even a script to copy tracks from the local machine to the library on the remote machine. And vice versa.
Doug’s Applescripts for iTunes provides the scripts, along with hundreds of other useful scripts. You might not realize how many things iTunes doesn’t do until you see what all these scripts can do.
This set of scripts comes with a handy centralized file for storing your specific system information, like computer and user names. The other scripts call this script at run time. You might want to leave your password out of the script for security reasons. But you’ll be prompted at run time.
We saw Remote Apple Events earlier in the week, with Remote Remote. Remote Remote facilitates playback on a remote machine along with several other functions.
Watch Now
|
Permalink
•
You Mac has some pretty fancy features built into its hardware, including the ability to turn itself on when it’s sleeping or powered off. This capability leverages nicely into an iTunes alarm clock.
In the screencast we’ll use the System Preferences to turn the Mac on at a specified time. Then we’ll set an appointment in iCal that runs an AppleScript a few minutes later. The script will kick off a Playlist in iTunes loaded with songs we’d like to wake up to.
Murphy made a few different scripts for the job. You can pick one or combine pieces from all of them to make your own. Here’s what they do:
- Wakeup1.scpt Script simply plays a Playlist
- Wakeup2.scpt Script plays each track in a Playlist for a specified number of seconds. That should annoy you out of bed.
- Volume.scpt Script gradually increases the iTunes volume until you click stop in iTunes.
You can download the scripts and edit them for your own needs. Feel free to post improvements in the comments.
We’re halfway through iTunes week. We’ll look at more AppleScripts the rest of the week courtesy of Doug’s AppleScripts for iTunes. Don’t forget to check back! Or better yet, subscribe to Murphy’s feed.
Watch Now
|
Permalink