Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:13:34+00:00 2026-06-14T21:13:34+00:00

In other words, how can I kick off some custom processing of newly uploaded

  • 0

In other words, how can I kick off some custom processing of newly uploaded files to FTP server on my machine with IIS-backed FTP server and .NET?

Clarification
This is to run on the machine that hosts FTP server. Permissions are not an issue in my case.

It seems I’d need to ask the uploading entities to add a listing file that is sent after the actual data file is completely uploaded. Imagine that there is an actual xxx.data file uploaded, followed by xxx.listing file that signifies completion of xxx.data file upload.

Originally this question was talking about Reactive Extensions. I was hoping that someone has a bridge from IIS 7.5’s FTP server to Reactive Extensions, so I can focus on the higher-level implementation details.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:13:35+00:00Added an answer on June 14, 2026 at 9:13 pm

    I’ve slimmed down the MSDN sample to focus in on file creation, as it’s the only event of interest when files are uploaded to FTP server.

    One would have to install the Reactive Extensions for this code sample to work in Visual Studio 2012.

     class Program
     {
         static void Main()
         {
             // Create a FileSystemWatcher to watch the FTP incoming directory for creation of listing file
    
             using (var watcher = new FileSystemWatcher(@"C:\FTP-Data\Incoming", "*.lst"))
             {
                 // Use the FromEvent operator to setup a subscription to the Created event.           
                 //                                                                                    
                 // The first lambda expression performs the conversion of Action<FileSystemEventArgs> 
                 // to FileSystemEventHandler. The FileSystemEventHandler just calls the handler       
                 // passing the FileSystemEventArgs.                                                   
                 //                                                                                    
                 // The other lambda expressions add and remove the FileSystemEventHandler to and from 
                 // the event.                                                                         
    
                 var fileCreationObservable = Observable.FromEvent<FileSystemEventHandler, FileSystemEventArgs>(
                                             UseOnlyTheSecondArgument,
                                             fsHandler => watcher.Created += fsHandler,
                                             fsHandler => watcher.Created -= fsHandler);
    
                 fileCreationObservable.Subscribe(ActionWhenFileIsUploaded);
    
                 watcher.EnableRaisingEvents = true;
    
                 Console.WriteLine("Press ENTER to quit the program...\n");
                 Console.ReadLine();
             }
         }
    
         private static void ActionWhenFileIsUploaded(FileSystemEventArgs args)
         {
             Console.WriteLine("{0} was created.", args.FullPath);
    
             // TODO
             // 1. Deduce original file name from the listing file info
             // 2. Consume the data file
             // 3. Remove listing file
         }
    
         private static FileSystemEventHandler UseOnlyTheSecondArgument(Action<FileSystemEventArgs> handler)
         {
             return (object sender, FileSystemEventArgs e) => handler(e);
         }
     }
    

    I am still working out the details of transforming observable of listing files to observable of actual data files. Stay tuned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In other words, can I do something with a volatile variable that could not
In other words, when I do nnet(...) I can use the size parameter to
In other words, if it returns 200, print True. Else, False. How can I
How can I host, say a Snap webapp, on amazon? In other words, what
I want to block special character in this code. In other words, user can
In other words: Can I respond with a 304 and have it just work?
Is Android backwards compatible, in other words can an application developed in Android 1.6
To put in other words: How can a class track whether its constructor is
Can I submit an iPad app without owning a iPad? In other words can
Why do we need boost::thread_specific_ptr, or in other words what can we not easily

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.