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 8993191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:08:18+00:00 2026-06-15T23:08:18+00:00

We have files sent to our FTP (windows server 2008 R2), and one of

  • 0

We have files sent to our FTP (windows server 2008 R2), and one of our services pick the file for processing. The files being to our FTP are of the order 500 MB and more..
How can determine in C# that the file has completed copying into the FTP directory? I dont want to read it while the file is still being copied.

  • 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-15T23:08:19+00:00Added an answer on June 15, 2026 at 11:08 pm

    Try and take an exclusive lock on reading it

    string filename = "Test.txt";
    
    try
    {
       using(FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.None))
       {
          // Read content here
       }
    }
    catch(IOException)
    {
        // Occurs if the file cannot be exclusively locked.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our Windows file server has an archive service installed that stubs files that have
I want to have my pdf files sent this way to my users :
For instance, you have an application which processes files that are sent by different
I have a CSV file sent to me in CSV. The field of interest
I have a file that is sent over https and I am handling with
I have files served like so: AJAX request handler -> Include file I would
I have files on the server. Originally their names are readable and users put
In my Visual Studio 2010 project I have files with .mm file extension, that
We have an Oracle 10g database (a huge one) in our company, and I
Throughout our enterprise we have many applications that log activity to text files for

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.