Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple file ftp transfer??

Status
Not open for further replies.

nick77

IS-IT--Management
Nov 29, 2002
6
GB
I am learning Unix and I need some help, how do I do a multiple file transfer with ftp in non-interactive transfer mode. I know how to get single files with "get file1 file1.copy". Can someone help me please...
 
hi
you could use mget to get files
mput to send files.
 
make sure and type prompt at the ftp prompt - this should turn off interactive mode.
 
Here is what I use. I run it as a script.

ftp -inv <<!
open 192.168.1.23
user username password
bin
put file1
put file2
put file3
quit



-Danny






 
Use this

ftp -inv <<!
open 192.168.1.23
user username password
bin
mput file*
by
 
Pardon me unixadmin -- but you forgot the 'prompt' command that stops mget and mput from asking if each file is ok.
[tt]
ftp -inv <<!
open 192.168.1.23
user username password
prompt
bin
mput file*
bye
!
[/tt]
Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
but he use -i paramater ,so he doesn't want to see information about transfers.Don't you think so?
 
yep, good point - I shouldn't have included -i on the command line Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
But can one use a shell variable instead of listing each file to transfer

list=&quot;/etc/passwd /etc/group /etc/hosts&quot;

ftp -nv <<!
open xxx.xxx.xxx.xxx
...
mget $list
!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top