Announcement

Collapse
No announcement yet.

Connection broken during file transfer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connection broken during file transfer

    A file on PC-1 is being overwritten by a new version from PC-2 over a WAN connection. If the connection is broken during the file transfer, will the file on PC-1 be corrupted?

    I expect BC will firstly transfer the file as a temp object. When file transfer is complete, file on PC-1 is drop and the temp object will be renamed to the original name. Could anybody tell me the true file transfer mechanism of BC?

  • #2
    Re: Connection broken during file transfer

    I think it should try to handle this, but it depends on the situation.

    The first question is, are you transferring using an SMB network drive, or over FTP?

    If you're transferring to/from a standard network drive, BC uses the standard windows CopyFileEx API to copy files. I imagine this API handles network problems, but BC doesn't do anything special beyond what the API does.

    For FTP, if you are copying to your local system, BC downloads files to a temp file first. When the transfer is complete, it copies the temp file to the target location.

    If you are copying files to an FTP server, it depends on the FTP server on the target side.
    Chris K Scooter Software

    Comment


    • #3
      Re: Connection broken during file transfer

      Thanks for your information. Instead of FPT, I am copying files from a remote server to a local computer via a Remote Desktop Session over the Internet. That is,
      \\RemoteServer\Folder ---> \\Tsclient\c\Folder

      May I know if BC will copy to temp files first?

      Comment


      • #4
        Re: Connection broken during file transfer

        When copying from a network drive to a local disk, BC will not copy to a temp file first. This means if there is a connection failure, the original file on the local disk will be lost.

        I tested this scenario with a 600 MB file copied over our office LAN. Copying a file over an existing file, then unplugging the network cable in the middle of the copy resulted in the file on the local drive being deleted.

        This same behavior also happened when copying the file using Windows Explorer.
        Chris K Scooter Software

        Comment

        Working...
        X