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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:58:28+00:00 2026-05-10T14:58:28+00:00

There is a limitation on Windows Server 2003 that prevents you from copying extremely

  • 0

There is a limitation on Windows Server 2003 that prevents you from copying extremely large files, in proportion to the amount of RAM you have. The limitation is in the CopyFile and CopyFileEx functions, which are used by xcopy, Explorer, Robocopy, and the .NET FileInfo class.

Here is the error that you get:

Cannot copy [filename]: Insufficient system resources exist to complete the requested service.

The is a knowledge base article on the subject, but it pertains to NT4 and 2000.

There is also a suggestion to use ESEUTIL from an Exchange installation, but I haven’t had any luck getting that to work.

Does anybody know of a quick, easy way to handle this? I’m talking about >50Gb on a machine with 2Gb of RAM. I plan to fire up Visual Studio and just write something to do it for me, but it would be nice to have something that was already out there, stable and well-tested.

[Edit] I provided working C# code to accompany the accepted answer.

  • 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. 2026-05-10T14:58:28+00:00Added an answer on May 10, 2026 at 2:58 pm

    The best option is to just open the original file for reading, the destination file for writing and then loop copying it block by block. In pseudocode :

    f1 = open(filename1); f2 = open(filename2, 'w'); while( !f1.eof() ) {   buffer = f1.read(buffersize);   err = f2.write(buffer, buffersize);   if err != NO_ERROR_CODE     break; } f1.close(); f2.close(); 

    [Edit by Asker] Ok, this is how it looks in C# (it’s slow but it seems to work Ok, and it gives progress):

    using System; using System.Collections.Generic; using System.IO; using System.Text;  namespace LoopCopy {     class Program     {         static void Main(string[] args)         {             if (args.Length != 2)             {                 Console.WriteLine(                   'Usage: LoopCopy.exe SourceFile DestFile');                 return;             }              string srcName = args[0];             string destName = args[1];              FileInfo sourceFile = new FileInfo(srcName);             if (!sourceFile.Exists)             {                 Console.WriteLine('Source file {0} does not exist',                      srcName);                 return;             }             long fileLen = sourceFile.Length;              FileInfo destFile = new FileInfo(destName);             if (destFile.Exists)             {                 Console.WriteLine('Destination file {0} already exists',                      destName);                 return;             }              int buflen = 1024;             byte[] buf = new byte[buflen];             long totalBytesRead = 0;             double pctDone = 0;             string msg = '';             int numReads = 0;             Console.Write('Progress: ');             using (FileStream sourceStream =                new FileStream(srcName, FileMode.Open))             {                 using (FileStream destStream =                      new FileStream(destName, FileMode.CreateNew))                 {                     while (true)                     {                         numReads++;                         int bytesRead = sourceStream.Read(buf, 0, buflen);                         if (bytesRead == 0) break;                          destStream.Write(buf, 0, bytesRead);                          totalBytesRead += bytesRead;                         if (numReads % 10 == 0)                         {                             for (int i = 0; i < msg.Length; i++)                             {                                 Console.Write('\b \b');                             }                             pctDone = (double)                                 ((double)totalBytesRead / (double)fileLen);                             msg = string.Format('{0}%',                                       (int)(pctDone * 100));                             Console.Write(msg);                         }                          if (bytesRead < buflen) break;                      }                 }             }              for (int i = 0; i < msg.Length; i++)             {                 Console.Write('\b \b');             }             Console.WriteLine('100%');             Console.WriteLine('Done');         }     } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 72k
  • Answers 72k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You need to Mock the ControllerContext, HttpContextBase and finally IPrincipal… May 11, 2026 at 1:37 pm
  • added an answer Subject lines are the only universal way I'm afraid. Have… May 11, 2026 at 1:37 pm
  • added an answer Even though it is best practice to call IDisposable.Dispose() yourself… May 11, 2026 at 1:37 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.