Downloading from FTP using wildcards on Command Line
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
Related videos on Youtube
Comments
-
bmgh1985 over 1 year
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 getThe filename, directory name, or volume label syntax is incorrect.
. When I run it asmput 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
-
bmgh1985 about 10 yearsAh, for some reason I had it in my head that it was off by default. Thanks