157712 FTP file transfer service


Create a C# windows service that scans local directories for files to send via FTP. Each source file can be sent to multiple FTP destinations. After files are successfully sent delete or archive the files.

Basic Requirements

- C# .Net 2.0

- Utilizes xml file for source file location and FTP destinations

- Follow the specs below or provide details on a better way to do this

- Clean efficient code

- Error capture can be sent to text file

Process 1: FileQueBuilder

1. Open XML doc to get destination and source lists

2. Make one folder inside the pickup folder for each destination (folder naming convention is c:\filesender\pickup\destination id - destination name) if it doesn't already exist

3. Delete any folders that are not listed in destinations list (throw error and continue if there are still files in directory)

4. Look at sources list and make a copy of each qualified file (Do a regex pattern match on the filename) into each destination listed in destid

5. Delete or archive original file to source folder/archive (create folder if doesn't exist)

6. If pickup attribute archive="true" then delete any files older than days value

Process 2: FileSender

1. Open XML doc to get destination and source lists

2. Look inside the first available folder in the pickup folder to see if any files are there to send

3. Match destinationid from folder name to retrieve the destination connection data in the XML doc

4. Open an FTP connection to the destination

5. If connection can't be made wait retry interval (milliseconds) and try connecting again

6. If connection still can't be made try connecting again the number of retry times

7. If connection can't be made then move on to next destination (log error)

8. When connection is made start with first file in directory and rename to [url removed, login to view]

9. If overwrite="false" then check to see if file exists and continue if it had transferred file if it exits (don't do check if overwrite="true")

10. After send completion, confirm that file actually exists in destination and remove .tmp at end of file in destination

11. After each successful send delete local file and continue on to the next file in the directory to send

12. If file send fails move on to next file and process again next time process runs (log error)

13. Close the FTP connection after a destination has been processed and move on to next destination


1. By creating a folder for each destination you can see which destination is failing if there is a problem. You also don't need to scan through a big list of files each time one location is failing and the other are not just to get to the files that can be transferred.

2. Both process should run as separate threads asynchronously so that process 1 doesn't have to wait for process 2 to complete to start again

3. Be able to increase the number of threads for the FileSender process so that more than one file can be FTP'd at a time and the different processes can be working on different destinations at the same time

Proposed XML Doc specs attached.

Skills: .NET, Anything Goes, XML

See more: service source, service first, regex or pattern, regex match list, regex is, regex in c, problem archive, name transfer, match problem, do a service, clean service, archive problem, regex &, windows service, scan to text, Regex, open file, name naming, file transfer, file folder

About the Employer:
( 22 reviews ) Redondo Beach, United States

Project ID: #1903897

Awarded to:


Please see PMB. Escrow is required. Thanks.

$450 USD in 5 days
(70 Reviews)