mget command in Windows command line FTP client does not download files
11,068
You have to use the prompt
command or the -i
command-line switch to suppress the confirmation prompts (mget 20161101.csv?
) before each file transfer.
open 123.345.456.567
username
password
binary
prompt
mget *.csv
disconnect
quit
Author by
Mark Tait
Updated on June 05, 2022Comments
-
Mark Tait almost 2 years
I'm trying to achieve something simple - other solutions I've found have not worked for me.
I want to use the windows scheduler to run a cmd file, to FTP to a server, and download all of the *.csv files in the default directory, the local directory the file is being run from.
Files in the remote directory are:
20161101.csv ... 20161129.csv
I created this file, and called it d.ftp:
open 123.345.456.567 username password binary mget *.csv disconnect quit
I then go to the windows command (CMD) and type:
ftp -s:d.ftp
All that happens is I see:
ftp> open 123.345.456.567 Connected to 123.345.456.567 220 User (123.345.456.567:(none)): 331 Password required for username (actual username is shown on the screen) 230 User username logged in. ftp> binary 200 Type set to I. ftp> mget *.csv 200 Type set to I. mget 20161101.csv? disconnect mget 20161102.csv? quit ftp>
No files are copied to my local directory, no CSV files are transferred.
Any ideas?
Thanks for any help.
Mark