batch ftp script

If for some reason You need a quick and dirty script to retrieve some file from a ftp server, just open your text editor and write some things into your file. Then a simple command line command will download the file You have just write the path.

MS-DOS way:

C:\TMP> TYPE COMMANDFILE.TXT

username

password

dir

get wp-config.php

quit

C:\TMP> FTP -S:COMMANDFILE.TXT ftp.server.name

UNIX/LINUX way:

$ cat test

user username password

dir

get wp-config.php

quit

$ ftp -n ftp.server.name < test

Tags: , ,

Leave a Reply