A quick way to share files from any directory

Posted by Cliff Brake on 2013-01-22 | 2 Comments to Read

Did you ever need a quick way to share files from a directory on your computer?  Or perhaps transfer a large file to another person?  With nodejs and express, you can easily set up a temporary web server that allows users to browse and access a list of files in a directory.  For convenience, I created a simple github project that can be cloned into any directory, and then a server started in a matter of seconds.  Yes, you could upload files to a server, or share them with a file sharing service, but if you can expose a random port on your computer to the person who needs the files, then this is faster, and does not require any intermediate steps.  Check out https://github.com/cbrake/http-file-server for more information.

  • Ross said,

    Prior art and with some useful features is Woof: http://www.home.unix-ag.org/simon/woof.html.

  • Chris said,

    A much simpler method, that only requires a vanilla Python installation is:
    > python -m SimpleHTTPServer 8000
    In whichever directory you want to serve files from.
    Additionally, you can change 8000 to any port you want, without having to edit the source.