Wishlist 0 ¥0.00

What is an ADI file

The ADI file type is primarily associated with Active@ Disk Image by Active@ Data Software. Active@ Disk Image is a software utility that creates disk, raw and ISO images. Disk images and Raw disk images are both saved as .ADI whilst ISO disk images retain the standard ISO format. A raw disk image copies the entire drive sector by sector, the differentiating attribute from a disk imaging that only copies the used sectors of a hard drive.  

File Transfer Resume

Basic Usage

 

WinSCP supports resuming file transfers with SFTP and FTP protocols. SCP and WebDAV protocols do not allow it. With S3 protocol, transfer can be resumed only immediately by reconnecting a lost session, not later.

Automatic Resume / Transfer to Temporary Filename

 

WinSCP is able to store file being transferred to temporary filename first, renaming it to the target name only once the transfer successfully finishes.

Reasons to do that:

  • If the transfer is interrupted, on the next attempt (either manual or automatic), WinSCP is able to automatically detect the partial/temporary file and offer you to resume the transfer (or even resume automatically).
  • While updating an existing file, the original version of the file exists during whole transfer. This is particularly useful when updating frequently accessed file on web sites.
  • If the server runs a process that automatically picks new files and processes them, it can be configured to ignore distinct names of temporary files. It prevents the process from picking an incomplete file, while it’s uploaded. See locking files while uploading.

Reasons not to do that:

  • As the file is uploaded to a temporary name, it is technically a new file, even though the file with target name already exists. As such:
    • after the original file is deleted and temporary file is renamed to the original file name, you lose all attributes of the original file (such as owner and group) except for basic permissions;1
    • while you may have permissions to overwrite the existing file, you might not have permissions to create new (temporary) file.

For performance reasons transfer to temporary file name is enabled by default for files larger than a given threshold. The threshold is initially 100 KB. You can change the threshold. You can also enable the feature for all files, particularly when looking to achieve the second impact. You may also need to disable the feature altogether, particularly if you do not have permissions required (e.g. permissions to create a new file in target directory). This can be configured on Endurance page of Preferences dialog.

If your transfer is interrupted, a partial file (with .filepart extension) remains in the target folder. After you try to transfer the file a second time, WinSCP looks for the partial file. If it finds a partial file, it offers you chance to resume the transfer (the confirmation can be disabled).

Note that partial files can be distinguished in file panel by special “torn sheet” overlay icon.

To configure transfer to temporary file name in scripting, use -resumesupport switch of file transfer commands. In .NET assembly use TransferOptions.ResumeSupport.

Transfer to temporary filename is supported with SFTP protocol only and only for binary transfers.

Manual Resume

 

There’s an alternative manual method to resume transfer, which can be used with FTP protocol.

If you attempt to transfer a file already in the target directory and the target file is smaller then the source file, the overwrite confirmation dialog displays a Resume command or an Append command (when appending is supported), in the drop down menu of the No button. After you click Append, WinSCP opens another prompt that lets you append source file or resume your transfer.

If you resume the transfer, WinSCP will skip a part of the source file equal to the target file’s size. The program will only transfer the remainder.

Note that you must have overwrite confirmations enabled to use the method.

The method is also useful for resuming transfers initiated by other clients and also to update log files. Manual resuming of text mode transfers with SFTP-4 and newer is not supported.

Common Problems

 

If you want to resume your transfer, you must use the same source file version as the interrupted transfer. If you do not, your target file will include the source file’s previous version and its current version. For automatic resume, if the partial file is bigger than the source file, WinSCP will display error and disallow resume.

If the target file exists and it is not write-able, but the target directory is, the file will may be transferred anyway with automatic resume. The error overwriting the file will occur only after the transfer finishes. It is because the file is first transferred into temporary file.

Resuming from Broken Connections

 

With SFTP and FTP protocols, when connection is broken, WinSCP can automatically reconnect and resume the transfer.2 This can be configured on Endurance page of Preferences dialog.

  1. For this reason WinSCP never transfers to temporary file name first, if the target file is know to be owner by another user. Note that the owner name can be detected with SFTP-4 and newer only.Back
  2. If transfer resuming/transfer to temporary files name is disabled, file transfer will start from the beginning, with SFTP protocol.Back

断点续传,续传文件是否是同文件判断

想做一个断点续传的程序,基本的已经实现,但我不知道怎么判断前后两次传,传输的两个文件是不是同一个文件,不是简单的判断文件名相同就可以了

假如,开始我向对方传c:a.rm文件,中途断掉,下次我传c:directorya.rm,虽然这两个文件名都是a.rm,但内容是完全不同的,那对方怎么知道是新的文件还是上次未传完的文件,或者说,是续传,还是重新传?

 

行走在赤道

  • 4.8k

 

 

上传:如果是上传的话这种需要客户端的支持,单纯凭服务器是没法做的,就像楼主说的一样没办法确定用户的行为。如果有客户端的话,可以利用MD5校验确定文件是否相同。

下载:服务器具体下载的文件是由URL决定,所以只要参数能对并且客户端也支持断点继续就没啥问题。

 
评论 赞赏 2016-09-21
  • luxianming

    md5校验,本地已经下了一半的和服务器需要下载的完整的文件的md5两者不一样的吧。为什么说下载url一样参数能对就是同一个文件,万一下载的软件有更新呢?url却是一样的,能详细说明一下吗?

     

 

  • 回复 2016-09-22
  • 行走在赤道

    url当然具有唯一性了。如果有2个不同的文件是使用同一个url下载,那就是程序的问题。

     
  • 回复 2016-09-22
  • luxianming

    谢谢,已经解决了,我的情况是服务端已经有文件的md5了,所以现在是更新的时候把服务端的md5也保存了一份在本地,发现是同名文件就进行比较~

 

解读断点续传的基本原理

       断点续传的理解可以分为两部分:一部分是断点,一部分是续传。断点的由来是在下载过程中,将一个下载文件分成了多个部分,同时进行多个部分一起的下载,当某个时间点,任务被暂停了,此时下载暂停的位置就是断点了。续传就是当一个未完成的下载任务再次开始时,会从上次的断点继续传送。
  
  使用多线程断点续传下载的时候,将下载或上传任务(一个文件或一个压缩包)人为的划分为几个部分,每一个部分采用一个线程进行上传或下载,多个线程并发可以占用服务器端更多资源,从而加快下载速度。
  在下载(或上传)过程中,如果网络故障、电量不足等原因导致下载中断,这就需要使用到断点续传功能。下次启动时,可以从记录位置(已经下载的部分)开始,继续下载以后未下载的部分,避免重复部分的下载。断点续传实质就是能记录上一次已下载完成的位置。
 
  断点续传的过程
  ①断点续传需要在下载过程中记录每条线程的下载进度;
  ②每次下载开始之前先读取数据库,查询是否有未完成的记录,有就继续下载,没有则创建新记录插入数据库;
  ③在每次向文件中写入数据之后,在数据库中更新下载进度;
  ④下载完成之后删除数据库中下载记录。
  
  断点续传在HTTP请求上和一般的下载有所不同,客户端浏览器传给Web服务器的时候要多加一条信息——从哪里开始(HTTP请求变量)。要实现HTTP断点续传,Web服务器必须支持HTTP/1.1(相对于HTTP/1.0老版本)。
  HTTP请求是有一个Header的,里面有个Range属性是定义下载区域的,它接收的值是一个区间范围,比如:Range:bytes=0-10000。这样我们就可以按照一定的规则,将一个大文件拆分为若干很小的部分,然后分批次的下载,每个小块下载完成之后,再合并到文件中;这样即使下载中断了,重新下载时,也可以通过文件的字节长度来判断下载的起始点,然后重启断点续传的过程,直到最后完成下载过程。
 
  FTP实现断点续传
  FTP协议也可以支持断点续传下载数据,基本原理是用get命令拿数据的时候在文件名后面加上要获取的起始位置。FTP实现断点续传有三个条件:
  ①断点续传需要服务器的支持,FTP服务器必须能提供断点续传的功能。
  传统的FTP Server是不支持断点续传的,因为它不支持REST指令;目前包括IIS和大部分的FTP架设软件都有了这个功能。用Serv-U架设FTP服务器就能支持断点续传。
  ②支持断点续传的下载工具软件
  QQ旋风、迅雷、影音传送带等大多下载软件都支持断点续传;IE浏览器5.0以前的版本默认的自带下载方式不支持断点续传。在手机上,UC浏览器支持断点续传,能够自动存储已下载的部分,重新打开之后可以继续在已下载部分的基础上继续下载。
  ③FTP服务器上的文件要与下载到硬盘中的文件名相同。
  在使用IE下载文件时,遇到网络中断,不需要重新启动机器,也可实现断点续传。前提是,在恢复下载、开始断点续传并提示再次保存文件时,要使用和第一次下载时相同的路径和文件名。

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.