File transfers between computers on a network can be a pain. No one wants to memorize hostnames and IP addresses are often dynamic. Apple made huge strides in simplifying the process with AirDrop but the UI leaves a lot to be desired especially if you are looking for fast transfers with minimal interactions. If you are an Alfred Powerpack user then you are probably already familiar with the many ways Alfred workflows can speed up simple actions without ever having to take your hands off the keyboard. Wouldn’t it be great if you could transfer files using Alfred with absolutely no configuration?
This is exactly what I had in mind when I made the Alfred File Transfer workflow. So how does it work? It is powered by the pyncp project. A few months ago one of my favorite blogs, One Thing Well, linked to the pyncp project which is a Python port of the popular linux utility – NCP. Pyncp is essentially a command-line tool for copying files across a LAN without any configuration. You simply run the pyncp push command on one computer, then run the pyncp poll command on the second computer and file is transferred. However, I ran in to some initial issues that prevented pyncp from working properly on OS X – so I forked the project, refactored some code, and got it working.
The Alfred File Transfer workflow is simple. First, install the workflow on each computer. Then select a file to transfer in Finder and show the list of available Actions using Alfred’s ⌥ + ⌘ + \ keyboard shortcut. Type push and select the corresponding Alfred action. On the second computer, simply bring up Alfred and type pull – the file will be transferred to the ~/Downloads folder on the destination computer. That is all there is to it!
Check out a video of the workflow in action:
This workflow is simple yet very powerful because it allows you to move files across your network using nothing more than your keyboard. It is worth noting that this does not provide the encryption and security provided by AirDrop so if you are transferring sensitive information on a public network – use with caution. However, I have found it extremely useful on my personal computers at home. If you find this workflow handy be sure to thank Felix Richter for his hard work porting NCP to the Python language.
Download the Alfred File Transfer workflow.