Batch script - FTP download

shooter69

Expert Member
Joined
Jun 4, 2012
Messages
3,387
Reaction score
934
Location
Dark Africa
Does anyone know how to write a batch script to download a file from a FTP site using a dos commands?

I know this is the dos commmands :
Open site
username
password
get file location
close


But I do not know how to put this into a batch script.
 
Oh boy! Even I know that FTP = file transfer protocol therefore a program is needed to effect the said FTP protocol and a username of anonymous and a password of your email address is used. A script is a set of commands in a text file with the execute flag set.
ALL IMHO! I am NOT a programmer!
 
Put the commands in a text file and use the -s switch



ftp -?

Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.

FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]

-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-w:buffersize Overrides the default transfer buffer size of 4096.
host Specifies the host name or IP address of the remote
host to connect to.

Notes:
- mget and mput commands take y/n/q for yes/no/quit.
- Use Control-C to abort commands.
 
Put the commands in a text file and use the -s switch



ftp -?

Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.

FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]

-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-w:buffersize Overrides the default transfer buffer size of 4096.
host Specifies the host name or IP address of the remote
host to connect to.

Notes:
- mget and mput commands take y/n/q for yes/no/quit.
- Use Control-C to abort commands.

Actually... Thanks for the info :)
 
Top
Sign up to the MyBroadband newsletter
X