Every once in a while you need to copy files from one computer to another. Across different operating systems, a sneakernet (read: copying files using a USB flash drive) seems to be the best option because most (if not all) computers can handle a USB. However, the process may be cumbersome if:
- You have to deal with large file(s). As the file size grows you will realize that this approach is not efficient. You need to copy from the first computer to the USB, then copy from the USB to the second computer (then optionally delete the file in the USB).
- You have to do it several times. Maybe because the files are too large for one time transfer, or maybe because you forget some files on the first trip. If the file is 4GB and you have a 2GB USB then you even have to split and join the file.
- You don’t have a portable USB disk drive :(
Enter Python, a place where just about everything is ready-made and included! Here are the steps to share your files with Python’s built-in HTTP server:
- Install Python on the first computer (the one with the files to share). This is mainly for Windows because most Linux distributions as well as Mac OS X include Python. Yeah!
- Put the two computers into the same network. For example, by connecting them using a LAN cable and setting their IP addresses to
- On the first computer (with IP address 1
220.127.116.11), open up a command prompt, navigate to the folder where the files are kept. Execute the command
python -m SimpleHTTPServer 8000(where
8000is a port number that can be omitted)
- Now on the second computer open up a web browser (any web browser: Firefox, Chromium, even IE) and visit and download your files at http://192.168.1.1:8000