• Two stages to copying files?

    From micky@3:633/10 to All on Thursday, November 12, 2026 12:15:58
    When I copy a bunch of files from one file manager to another, it goes
    slowly, one at a time for a long time, and when it's done with that
    stage, it goes quickly, within 5 or 10 seconds again, as if it is
    finalizing the copy. What really goes on during the two stages?

    The first stage must be the actual copy, but what is the second stage?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From knuttle@3:633/10 to All on Thursday, November 12, 2026 07:19:59
    On 11/12/2026 5:15 AM, micky wrote:
    When I copy a bunch of files from one file manager to another, it goes slowly, one at a time for a long time, and when it's done with that
    stage, it goes quickly, within 5 or 10 seconds again, as if it is
    finalizing the copy. What really goes on during the two stages?

    The first stage must be the actual copy, but what is the second stage?
    My uneducated guess is that in the first stage the files to be copied
    are collected somewhere and the second they are written to the new location.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Thursday, November 12, 2026 12:49:35
    On Thu, 11/12/2026 5:15 AM, micky wrote:
    When I copy a bunch of files from one file manager to another, it goes slowly, one at a time for a long time, and when it's done with that
    stage, it goes quickly, within 5 or 10 seconds again, as if it is
    finalizing the copy. What really goes on during the two stages?

    The first stage must be the actual copy, but what is the second stage?


    Since you are the king of tricks, we cannot fall for your syntax :-)

    Are you referring to a copy from one explorer.exe window to
    a second explorer.exe window ? Perhaps you have one of the
    alternate File Managers, we'll call it "FM2" for lack of a name.

    explorer.exe to explorer.exe using local disks
    explorer.exe to explorer.exe local disk to share
    explorer.exe to FM2.exe window using local disks
    explorer.exe to FM2.exe local disk to share
    shell+copy from command line (has entirely different behavior)

    There can be a multitude of cases involved, so
    we would want to be absolutely sure what you're
    doing, before snapping out an answer.

    The other way to answer the question, is to do a trace
    and see for yourself. Process Monitor can do the trace.

    As a guiding principle, file copying has to work on
    a low resource machine. We cannot make up non-scale-able
    descriptions or we will be immediately corrected by
    the audience for being silly. As an example, on purpose
    I made a non-scale-able "paulcopy.exe" which reads a file
    into memory, then writes it out once the file is completely
    in memory. This is fun, but it cannot handle that 100GB file.
    This is how I learned there is a bug in fwrite() :-)

    The first pass can be "assembling metadata" from the files,
    in order to estimate the copy time (which is silly, when
    the copy in the shell does not do that and it just copies).

    *******

    Why not record what happens with Process Monitor, then set up
    the filter events such as:

    Operation Is CreateFile
    Operation Is ReadFile
    Operation Is WriteFile

    and the times and the names, indicate what is happening.

    https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

    Normally, the copy starts with an enumeration of all the files in
    the source, in an attempt to create an estimate of the transfer time.

    Then the physical transfer starts after that.

    Each file is transferred in a "for loop", with a buffer of a
    fixed size. That's the kind of pattern you expect to find
    in your trace. It could be read64K, write64K kind of thing.

    Then you can tell us how it works :-)

    Paul


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From JJ@3:633/10 to All on Friday, November 13, 2026 12:03:34
    On Thu, 12 Nov 2026 12:15:58 +0200, micky wrote:
    When I copy a bunch of files from one file manager to another, it goes slowly, one at a time for a long time, and when it's done with that
    stage, it goes quickly, within 5 or 10 seconds again, as if it is
    finalizing the copy. What really goes on during the two stages?

    The first stage must be the actual copy, but what is the second stage?

    Are you sure the file is not simply just big enough? If not...

    If it seems to happen to all multiple files copy operation (i.e. batch copy) regardless of which files, chances are that, the anti virus is interferring
    - scanning the file data before or as it's copied. The bigger the file, the slower copy operation it would be.

    If it happens to specific file, it's likely that, the storage area which
    hold the file data is worn out and possibly became bad sectors. In this
    case, the slowness is due to the fact that, the system kept retrying on
    reading the bad sectors until it succeeded.

    If the storage device (either the source or the destination storage) is connected using a cable, try replugging the data cable, or replacing the
    data cable. If it's a thumb drive, replug it or plug it to a different port.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From micky@3:633/10 to All on Friday, November 13, 2026 11:53:06
    In alt.comp.os.windows-11, on Fri, 13 Nov 2026 12:03:34 +0700, JJ <jj4public@gmail.com> wrote:

    On Thu, 12 Nov 2026 12:15:58 +0200, micky wrote:
    When I copy a bunch of files from one file manager to another, it goes
    slowly, one at a time for a long time, and when it's done with that
    stage, it goes quickly, within 5 or 10 seconds again, as if it is
    finalizing the copy. What really goes on during the two stages?

    The first stage must be the actual copy, but what is the second stage?

    Are you sure the file is not simply just big enough? If not...

    If it seems to happen to all multiple files copy operation (i.e. batch copy)

    It does happen all the time, unless the number of files is so short that
    it's finished in a couple seconds. In this case, a typical one, I was
    copying photographs and videos from my phone to the laptop** As I
    usually do, I thought everyone experienced this, would know what I
    meant, so I didn't think I needed to describe it better.

    **Using MyPhoneExplorer fwiw, but it would happen no matter what when
    using windows copy, I think.

    regardless of which files, chances are that, the anti virus is interferring
    - scanning the file data before or as it's copied. The bigger the file, the >slower copy operation it would be.

    If it happens to specific file, it's likely that, the storage area which

    No, it's no specific file.

    hold the file data is worn out and possibly became bad sectors. In this
    case, the slowness is due to the fact that, the system kept retrying on >reading the bad sectors until it succeeded.

    If the storage device (either the source or the destination storage) is >connected using a cable, try replugging the data cable, or replacing the
    data cable. If it's a thumb drive, replug it or plug it to a different port.

    I'm not complaining. It's fast enough and no one makes me sit and watch
    it anyhow. I can do other things on the computer or elsewhere. It's
    just a curiosity to me that the copy is done in two stages.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Friday, November 13, 2026 08:42:10
    On Fri, 11/13/2026 4:53 AM, micky wrote:
    In alt.comp.os.windows-11, on Fri, 13 Nov 2026 12:03:34 +0700, JJ <jj4public@gmail.com> wrote:

    On Thu, 12 Nov 2026 12:15:58 +0200, micky wrote:
    When I copy a bunch of files from one file manager to another, it goes
    slowly, one at a time for a long time, and when it's done with that
    stage, it goes quickly, within 5 or 10 seconds again, as if it is
    finalizing the copy. What really goes on during the two stages?

    The first stage must be the actual copy, but what is the second stage?

    Are you sure the file is not simply just big enough? If not...

    If it seems to happen to all multiple files copy operation (i.e. batch copy)

    It does happen all the time, unless the number of files is so short that
    it's finished in a couple seconds. In this case, a typical one, I was copying photographs and videos from my phone to the laptop** As I
    usually do, I thought everyone experienced this, would know what I
    meant, so I didn't think I needed to describe it better.

    **Using MyPhoneExplorer fwiw, but it would happen no matter what when
    using windows copy, I think.

    regardless of which files, chances are that, the anti virus is interferring >> - scanning the file data before or as it's copied. The bigger the file, the >> slower copy operation it would be.

    If it happens to specific file, it's likely that, the storage area which

    No, it's no specific file.

    hold the file data is worn out and possibly became bad sectors. In this
    case, the slowness is due to the fact that, the system kept retrying on
    reading the bad sectors until it succeeded.

    If the storage device (either the source or the destination storage) is
    connected using a cable, try replugging the data cable, or replacing the
    data cable. If it's a thumb drive, replug it or plug it to a different port.

    I'm not complaining. It's fast enough and no one makes me sit and watch
    it anyhow. I can do other things on the computer or elsewhere. It's
    just a curiosity to me that the copy is done in two stages.


    So that is a transfer with MTP protocol over USB ?

    Well, no wonder that sucks.

    You should start by reading the Wiki article on it,
    to better understand what a stinker of a protocol that is.

    https://en.wikipedia.org/wiki/Media_Transfer_Protocol

    Paul

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)