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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:35:40+00:00 2026-06-17T21:35:40+00:00

I am copying several backup files which includes small to large files that is

  • 0

I am copying several backup files which includes small to large files that is greater that 1 TB from a local folder to a network shared folder using C# File.Copy() function. Previously this worked well. But in recent times I am facing different types of exception at different time. I also tried using the NET USE command to create a shared path connection even though the credentials are the same to resolve this problem.

File.Copy(sourceFilePath, destinationFilePath, overwrite);

The exceptions I am getting are:
– Error: Could not find file.
– Error: The handle is invalid.
– Error: There are currently no logon servers available to service the logon request.
– Error: The specified network name is no longer available.

NB: These exceptions are not for invalid file path. Because exceptions occurs after copying some portions of the file and same code was worked before for the same files.

Anyone have the idea to resolve this kind of situation?

  • 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-17T21:35:41+00:00Added an answer on June 17, 2026 at 9:35 pm

    There are known problems with Windows when copying very large files. See Windows file copy bug revisited, for example. The problem seems to be that Windows wants to cache the file, and it goes to heroic efforts to do so. It ends up allocating almost all memory to caching, finally causing fatal thrashing. This will cause a non-deterministic error on the other system (that’s trying to copy the file).

    The way to counter that is by copying the file without buffering by calling CopyFileEx. Unfortunately, there is no direct way to do that from the .NET Framework. So I wrote and published some code that does. See A Better File.Copy Replacement.

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

Sidebar

Related Questions

I have a problem which requires me to parse several log files from a
I'm copying a Magento Enterprise 1.11.2.0 core file called Preview.php into the local folder
We get a large amount of data from our clients in pdf files in
I am copying several fields' values from one list item to another. If I
I have a MySQL query that is copying data from one table to another
I am in the process of migrating a large amount of data from several
I am copying several worksheets from one workbook to another. The first sheet contains
I have several config files in different projects in my master solution that are
I am copying code from website matplotlib and pasting into the Vim editor in
I'm copying ListViewItems from one ListView to another, sth. like: foreach (ListViewItem item in

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.