Click here to Skip to main content
Click here to Skip to main content

Application for uploading modified Files to a FTP Server

By , 14 Oct 2002
 

Introduction

This is a (greatly enhanced) .NET version of the code in my article "Perl Script for uploading modified files to a FTP-Server". Since most of the behaviour is completely the same, please read further details of the description in the article mentioned.

The whole purpose of the application is to upload files from your local Window PC (or LAN) to a FTP server or Windows file server, uploading only files and folders that you want (by a filter) and that actually changed since last upload (by comparing timestamp and filesize).

Installation

The application has no GUI at all, meaning that it is a .NET console application.

Before you use the FTPSync application the first time, please adjust the application-configuration in the file FtpSync.exe.config. This file is a regular .NET XML-configuration file; you can edit it with any text-editor.

Usage of the Application

The application is driven by configuration files with the file extension *.ftpsyncjob. E.g. MyWebsite.ftpsyncjob. You pass a configuration file as the first parameter when starting the application. These configuration files are XML, too.

The configuration files contain all the settings that are needed to upload files and folders to a FTP server. An example configuration file Example.ftpsyncjob is included in the downloads of this article. Open it in your prefered text editor and read the comments for a full description of all options.

History

In ascending order:

  • 2002-09-13 Initial release
  • 2002-09-14 Added Regular Expression support (see example .ftpsyncjob file)
  • 2002-10-12 Added more options, added multi-project support, added Windows-filesystem upload method support (in contrast to FTP upload method), renamed .ftpsync.config files to .ftpsyncjob files.

To mention...

The application is written in C# and is an enhanced version of the "FTP component written with fully managed code" by Alex Kwok. I enhanced it so that creation of FTP folders is possible and that the component handles virtual FTP folders on a Windows FTP server (which don't show up using the LIST FTP command). Thanks to Alex for the component!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Uwe Keim
Chief Technology Officer Zeta Producer Desktop CMS
Germany Germany
Member
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.
 
In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.
 
Some cool, free software from us:
 
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email
Some random fun stuff in German

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 1memberRobin Saini4 May '11 - 23:19 
too old version. please develope in .net 3.5
GeneralTo develop client server application for ftpmemberb_men12312 Nov '06 - 20:02 
HI
I have a problem regarding "HOW TO TRANSFER FILES FROM CLIENT TO SERVER AND VICE VERSA" I used c# for this application. Can any body help me in this problem.
It will be your greatness if u help me.

CONTACT:-umarmir_123@yahoo.co.in
nisar_3s@yahoo.co.in
Thanks.
Generalbug at the getFileSize functionmemberhacx2k614 Oct '06 - 0:01 
you might wanna change the getFileSize to open the file at read mode rather then doing it in read/write, sometimes when the file is in use it stops the all sync with an exception.
 

GeneralthanksmemberShiva Varshovi8 Mar '05 - 21:25 
It was so usefull to me.
GeneralRe: thanksmembersmartentity3 Aug '05 - 21:14 
Have you ever tried www2ftp.com ?
 
Best Regards.

 
Ali Varshovi
GeneralRe: thanksmemberwebleo25 Nov '05 - 2:36 
Not able to down load the source code. Is it moved to some other link? Please advice.
QuestionHow to Move Files and Folders on a FTP servermemberusmanm@vonemm.com22 Jul '04 - 20:35 
Hello
I need to move files and folders on a ftp server.can you help me
Regards,
Usman
AnswerRe: How to Move Files and Folders on a FTP servermembersharad1628 Sep '04 - 0:29 
dear,
 
If you can wait for 1-2 days. I can help you in this matter,
 
Bye
Takecare
 
Sharad Blush | :O
[ sks1607@rediffmail.com ]
AnswerRe: How to Move Files and Folders on a FTP servermemberkapil Kumar Garg24 Jan '07 - 20:30 
Did you get any reply on moving files/folder at remote server??
If yes, Pls update me.
 
Thanks in advance
 
Kapil Garg
Generalscript fails if any file is deleted from local directory.membersavya2 Jun '04 - 2:06 
Confused | :confused: script fails if any file is deleted from local directory.script uploads all the files all over again.
i would like 2 make a suggestion on improvement.if any of the uploaded files are deleted at remote ftp server then this script should upload that file again.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 15 Oct 2002
Article Copyright 2002 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid