Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scriptable FTP client

Tags:

scripting

ftp

I need to have a script download all file in a given directory. I only have ftp access.

A quick test shows that I can't talk my ftp client into logging in from the command line. Even after trying Arnshea's answer it refuses to read the password from the file or stdin.

Even after logging in I can't download wild cards. (fixed with mget, thanks Arnshea)

Trying wget also fails.

I'd be fine with windows or Linux as long as it's simple.

like image 640
BCS Avatar asked Jan 21 '26 13:01

BCS


1 Answers

if you're on windows you can pass it a text file with the commands to execute...

e.g.,

ftp -s:ftptest.txt ftp.download.com

where ftptest.txt contains

anonymous
[email protected]
bin
hash
prompt
mget *.*
quit
like image 145
Shea Avatar answered Jan 24 '26 13:01

Shea