Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

ftp help needed

Thread Tools
 
Search this Thread
 
Old 11th Mar 2005, 09:20
  #1 (permalink)  
Thread Starter
 
Join Date: Jun 2001
Location: Bristol,UK
Posts: 225
Received 11 Likes on 7 Posts
ftp help needed

I am trying to use mget to pull some files that I know the start of the name but not the case of the start of the name.
Anybody know how to do this?
under_exposed is online now  
Old 11th Mar 2005, 12:52
  #2 (permalink)  
 
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  
Old 15th Mar 2005, 08:07
  #3 (permalink)  
Thread Starter
 
Join Date: Jun 2001
Location: Bristol,UK
Posts: 225
Received 11 Likes on 7 Posts
TIC, It is UNIX I am using, the remote is an unknown. Unfortunatly mget [Ff][Oo][Oo]* does not work.
mget myfile .txt will bring down a file regardless of case ONLY if globbing is switched off! We were hoping to use the case command to fold the names to lower case during the transfer.
Tried RTFM, TFM is now in the bin!
under_exposed is online now  
Old 17th Mar 2005, 12:13
  #4 (permalink)  
 
Join Date: Mar 2002
Location: London, UK
Posts: 437
Likes: 0
Received 0 Likes on 0 Posts
I am trying to use mget to pull some files that I know the start of the name but not the case of the start of the name.
Does the DIR command not work ?
RomeoTangoFoxtrotMike is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.