PPRuNe Forums - View Single Post - ftp help needed
Thread: ftp help needed
View Single Post
Old 11th Mar 2005, 12:52
  #2 (permalink)  
The Invisible Cat
 
Join Date: Feb 2004
Location: a stealth search-engine in Cheshire
Posts: 60
Likes: 0
Received 0 Likes on 0 Posts
It depends on what the remote system is.
If it's a UNIX (incl LINUX) system you could do something around :

mget [Ff][Oo][Oo]* assuming the file name starts with foo

Clue : experiment with ls beforehand

Excerpts from the ftp manpage below
You probably do not have access to it if you are on a Windows system, ortherwise RTFM

glob Toggle filename expansion for mdelete, mget and mput. If
globbing is turned off with glob, the filename arguments are
taken literally and not expanded. Globbing for mput is done as
in csh(1). For mdelete and mget, each remote filename is
expanded separately on the remote machine and the lists are not
merged. Expansion of a directory name is likely to be different
from expansion of the name of an ordinary file: the exact result
depends on the foreign operating system and FTP server, and can
be previewed by doing:

mls remote-files -

Note: mget and mput are not meant to transfer entire directory
subtrees of files. That can be done by transferring a tar(1)
archive of the subtree (in binary mode).

ls [ remote-directory ] [ local-file ]
Print a listing of the contents of a directory on the remote
machine. The listing includes any system-dependent information
that the server chooses to include; for example, most UNIX
systems produce output from the command ls -lA. (See also
nlist.) If remote-directory is left unspecified, the current
working directory is used. If interactive prompting is on, ftp
prompts the user to verify that the last argument is indeed the
target local file for receiving ls output. If no local file is
specified, or if local-file is -, the output is sent to the
terminal.

mget remote-files
Expand the remote-files on the remote machine and do a get for
each filename thus produced. See glob for details on the
filename expansion. Resulting filenames are then processed
according to case, ntrans, and nmap settings. Files are
transferred into the local working directory, which can be
changed with lcd directory; new local directories can be created
with ! mkdir directory.
The Invisible Cat is offline