Reputation: 1070
Is it possible to continue ftp download after reconnecting to ftp server?
Upvotes: 6
Views: 3343
Reputation: 239081
Yes. At the protocol level, send the server "REST <seek>" before RETR to seek to a position in the file (so if you already have 1500 bytes of the file, execute "REST 1500" and it will start sending from the 1501st byte).
Here's an example:
TYPE I
200 Switching to Binary mode.
PASV
227 Entering Passive Mode (140,186,70,20,223,87)
REST 800
350 Restart position accepted (800).
RETR welcome.msg
150 Opening BINARY mode data connection for welcome.msg (954 bytes).
226 File send OK.
Upvotes: 10
Reputation: 22487
Yup, the specific command in the command line FTP client is "reget." The protocol command is RESTART (or REST), as documented about half way down the page in the RFC959: FTP: File Transfer Functions page.
The Windows command line client doesn't support it though, as Dave points out.
Upvotes: 6
Reputation: 97701
Yes, it just depends on your client. With plain old text "ftp.exe", no. But if you download FileZilla or are using ncFTP on Unix, yes, they'll resume.
Upvotes: 1