We access an FTP site that has files on it, saved daily with the date in the form YYYYMMDD.
What I am trying to do is run FTP in the command line to download all files with YYYYMMDD in them. Currently I have the following going through the FTP:
binary
cd /Outgoing
lcd c:\temp\FTP\files
mput *20140312*
Quit
Unfortunately, when I get to the line mput *20140312*
, I get The filename, directory name, or volume label syntax is incorrect.
. When I run it as mput 946_20140312_040000.csv
it works fine. I am running ftp with the -i and -g commands to allow for wildcards and to do it without prompts.
Ideally, I would like to get this working with the built in FTP functionality and would install another command line client as a last resort.
Thanks
Best Answer
Just let the
-g
away it disables globbing which means that the wildcaracter expansion is also turned off. Have a look here http://unixhelp.ed.ac.uk/CGI/man-cgi?ftp