Retrieve Any File on Your Home Computer by Email
Posted by Adam Pash at 7:00 AM on February 19, 2008
The Murphy Mac weblog steps through how to retrieve any file on your Mac using a simple AppleScript in conjunction with Mail.app. When you've finished configuring the script, you can send an email to your home computer with a keyword subject and the full path to the file you forgot—say your homework or that big Keynote presentation—and the script will automatically email the file to you. Of course there are tonnes of other ways you could go about accessing your home files remotely, but Murphy Mac's slick solution is a good option to add to the list.
Tags: applescript | email | how to | mac os x | remote access | remote computing | top

Comments (AU Comments · US Comments)
There are currently no AU comments for this post.
extremer
Posted 8:11 AM 19/2/08
Is there something like this for the PC? This seems like a perfect solution for me.
extremer
honeycut
Posted 9:18 AM 19/2/08
Sure, I remember the full path to all my important files. haha! In any case this is still a pretty cool trick.
honeycut
DerekH
Posted 10:20 AM 19/2/08
There may not be anything yet, but I guarantee someone using AutoHotkey and some rules in Outlook could very easily set one up. I wouldn't be surprised if Gina had something already...
DerekH
gyffes
Posted 10:20 AM 19/2/08
Verily, that script is nigh unto the apex of geekdom.
gyffes
kpc2000
Posted 10:20 AM 19/2/08
Hi, This is for a Mac. Is there instructions for MS Windows XP or Vista?
Thanks
kpc2000
holymogwai
Posted 11:24 AM 19/2/08
@leefur: I'm sure the IT people will appreciate it when they see you've bypassed whatever restrictions they have in place and using all the bandwidth to play your music.
Your best bet would be to just copy it to your work computer. If they dont allow that then they're not going to allow you to stream it all day.
holymogwai
mathmonkey
Posted 11:24 AM 19/2/08
This is really cool, but it would be even better if you could send an email with a search term first. Then what's returned could be the full path to files in the search.
mathmonkey
leefur
Posted 11:24 AM 19/2/08
Hrmph. I looked through this and the three linked articles but none gets at what I'm after.
It seems fairly reasonable - I want to have my (65 gig) music folder on my external drive at home mappable so I can use it as my Music folder for iTunes at work. Any ideas?
leefur
mulletmandan
Posted 12:27 PM 19/2/08
[www.seeqpod.com] Best. Site. Ever. Pandora's great for discovering new artists, but seeqPod is awesome for creating custom playlists or listening to songs on demand.
mulletmandan
leefur
Posted 12:27 PM 19/2/08
@holymogwai: Or I could stream Pandora all day. The point isn't that the IT people (who don't exist where I work) wouldn't appreciate it (the closest we have to IT people don't care). But I thank you for representing their viewpoint.
For now I have it on a personal external hard drive, but it's lame I have to lug that thing around if I wanna listen to my stuff at home.
leefur
-emory-
Posted 1:27 PM 19/2/08
@leefur: You could try ( I imagine you're running xp or vista?) running hamatchi, it's a wonderful little program that allows you to set up what the computer thinks is a LAN connection over http, useful for just that, but what i"ve found always worked best and easiest was to use Vibe Streamer. Free, simple, easy to use. (Just make sure to forward the port on your home router) Hope that helps!
-emory-
Myles
Posted 3:31 PM 19/2/08
Good solution is to upload any sort of projects or files you might need to Google Docs. This has worked great for me. Although it doesn't get formatting right so that may pose a problem.
Myles
Jon Galloway
Posted 4:32 PM 19/2/08
I've been pretty happy with the remote file access in FolderShare (Windows).
Jon Galloway
hicks
Posted 5:37 PM 19/2/08
On XP Pro (and Vista too, probably Business or Ultimate only, maybe Home Premium too), you can use Remote Desktop, log directly the hell into your machine and use it like you're sitting in front of it. I've used it a number of times to do exactly what the article suggests--mail a file that I've forgotten (or suddenly need) from home to work, or set some time-consuming task I forgot to do before leaving the house, like encoding video.
Those of you behind routers with built-in firewalls may have to introduce yourselves to the wonderful world of NAT, but it's easy stuff.
hicks
leefur
Posted 6:37 PM 19/2/08
@-emory-: Hey Emory, thanks for the earnest attempt but alas, I'm on a Mac.
Say it ain't so! Say it ain't easier on a PC! (again, to map a drive/folder on my home Mac to be available on another Mac over the interweb)
leefur
JeffDrake
Posted 11:12 PM 19/2/08
So . . . anyone got a solution for this over PC?
I work in a secure government facility wher the only acceptable method of getting files to ourselves is by emailing them in, that way they go through all the appropriate filters and such. I cannot install a VPN, I cannot access Google Docs, I cannot access web based email, I cannot install FolderShare, I cannot access Logmein or GoToMyPC. If I could send myself an email and get a file to return to me, that would be AWESOME
JeffDrake
lauriek
Posted 12:32 AM 20/2/08
Is it just me or does this open a rather huge security hole?
lauriek
nad
Posted 1:59 AM 20/2/08
@lauriek: There's no hole. If you do this with secure email end to end I can't think of a single instance in which this makes you vulnerable.
nad
JoeAtTrends
Posted 2:37 AM 20/2/08
@nad: I could see one security risk, if you didn't actually check the email addresses, which would be the case where you were at a friends with an email you didn't already approve.
I wonder how many emails this guy got from random people with FileGrab subject line and /var/db/shadow/hash for the content area.
I use rAdmin personally, or an ssh tunnel onto my network at home, usually I am at least somewhere where I can do this, like my work laptop, or a friends PC.
JoeAtTrends
nad
Posted 4:48 AM 20/2/08
@JoeAtTrends: If you set this up like the post describes this is secure. Using a friend's computer, as you suggest, introduces risks that would apply with many tools, including logmein and ssh. That's not really a basis to criticize what this method does.
If you set this up with secure email you're protecting the email subject, which is essentially a password. With ssl that's pretty darn secure.
One more thing: The idea behind a post like this isn't to replace ssh or logmein or rAdmin. It's to show you that your Mac can respond to text in an email with Applescript, Automator apps, and shell scripts. From there you decide how you might be able to leverage it.
nad
shantanu.goel
Posted 4:48 AM 20/2/08
I do have a solution for windows/outlook :). Will post it when I get back home
shantanu.goel
shantanu.goel
Posted 5:48 AM 20/2/08
So, guys I managed to make something similar for Windows (Outlook) and you can find the details, download at
[tech.shantanugoel.com]
shantanu.goel
MurphyMac
Posted 5:48 AM 20/2/08
@JoeAtTrends:
Joe - I got quite a few emails with SLEEPER in the subject when I posted about how to sleep your Mac by email. Thank god for filters.
We had the same security discussion back then. If you think it through you'd be hard pressed to successfully exploit this.
I'm a big fan of ssh and logmein.com and other tools mentioned here. What I love about triggering things from email is how easy it is to set them off and running.
MurphyMac
guest0154
Posted 5:48 AM 20/2/08
Looks like it uses some sendmail like features. I'll bet thats a great way to introduce some scripts to download virus' and have your machine rooted. I'd be careful with that one.
guest0154
MurphyMac
Posted 5:48 AM 20/2/08
@mathmonkey: Someone in the UK tested this script for me and suggested the same thing. That wouldn't be too tough to implement, but I'd probably incorporate it as a separate script.
I posted a long time ago about making a pdf listing all the files in a folder. There are probably easier ways to automate this task though.
MurphyMac
FriarKhan
Posted 6:47 AM 20/2/08
@shantanu.goel: Kudos for the windows/outlook solution, I'll have to give that a try later on. :D
@honeycut: I agree with you, I'm never going to have memorized the path to the files I'd need. While this sort of technique is awesome for people who can't use remote desktop or similar solutions for security reasons, the path issue is a big problem for me.
From my POV these scripts would greatly benefit from a program that could output the path of every file on your hard drive (or the "My Documents" part of it anyway) to a text file. That way if you have an idea of the filename you can search for the filename to find the full path within the text file. Does anyone know of any such program I could use to generate such a text file? I could easily see myself generating the text file overnight and e-mailing it to myself whenever I need emergency access to files.
FriarKhan
shantanu.goel
Posted 7:52 AM 20/2/08
@@FriarKhan: What's more, the tool can be modified to behave differently for different keywords. The tool/macro can be sent a keyword that generates a text file (maybe using smthing like tree /F > paths.txt) of directory structure of a given base path and sends to u, then u can choose the files u want and send the mail again. ;)
shantanu.goel
MurphyMac
Posted 7:52 AM 20/2/08
@FriarKhan: I don't use Windows much anymore - but you might start at the command line with
tree /F
MurphyMac
FriarKhan
Posted 8:52 AM 20/2/08
@MurphyMac and @shantanu.goel: "tree /f /a > paths.txt" is oh so sexy! :D
Thank you both a bunch; that command is precisely what I was hoping for.
FriarKhan
gyffes
Posted 1:07 PM 20/2/08
For what it's worth, I have FolderShare running on two macs and it works great.
One somewhat scary issue, however, is that when I went to the website and tried to access the shared folder (via a linuxbox, but don't think that was an issue), I had access to THE ENTIRE MAC. NOT just the folder marked "for foldershare."
Granted, I needed to log into FolderShare as m'self in order to access the machine, and I could browse and download from/not upload to, but it still seems a fairly remarkable security hole.
If that's not a concern for you, however, FolderShare really does work seamlessly, Mac or PC (and, via the website, on a linuxbox).
gyffes
mathmonkey
Posted 1:47 PM 20/2/08
@leefur:
Decidedly lower-tech solution is to just load up some of your library onto a thumbdrive. I did this awhile back and made sure to load up the kind of music that's good to listen to when I'm working, which is just a small fraction of my library. Every computer has an MP3 player, and thumbdrives are cheap.
mathmonkey