Skip to content
Maarten Balliauw
← back
CSharp 1 min read

Commandline FTP folder download

edit this page

A quick annoyed post… I just spent two hours searching the Internet for a means on how to recursively download a complete FTP folder, command-line, and in a simple way. Oh yeah, and preferably freeware.

The solutions I found were not what I expected: a $50 software product providing a GUI (I said command-line! [:@]), a bloated scheduler thingy that does download in the background (I said simple! [8o|]), to batch-files relying on Windows built-in ftp.exe and a gigantic list of all files that need to be downloaded.

Here’s the thing: the searching really p*ssed me off! Not one thing provides the amount of ease I demand! Luckily, my good friend C# came to the rescue. CodeProject.com provided me this article on a ready-to-use FTP client class. Some additional magic, a glass of cola and… Here’s FTPFolderDownload version 1.0! Feel free to download, compile, modify, abuse, … this piece of code.

Usage is simple: pass along some command line arguments (list is below), and see your FTP files coming in.

List of arguments:

plaintext
    /server="<server hostname>"

    /username="<username>"

    /password="<password>"

    /remoteFolder="<remote folder>"

    /localFolder="<local folder>"

    /recursive
Maarten Balliauw

Writing about .NET, web, performance and security, since 2006.

Related posts

★ Prefer this blog on Google