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!

ftp multiple files

Status
Not open for further replies.

ariochian

IS-IT--Management
Mar 19, 2003
9
US
Hey everyone,
I have a need to ftp a bunch of files from the same server yet they are spread out over 3 or 4 directories..

what I need is a ftp script that will automatically login anonymously and that can automatically read in a listing of the directories and files and grab the files and place them into a predifined directory without creating the directory associated or listed in the file..

Here is a small example of the list file. (these are the directories and files located on a server that i need to get, I dont need the directories just the files, but I need to get from these seperate directories)

/aix/fixes/v4/sp/LoadL.full.2.2.0.22.bff
/aix/fixes/v4/sp/LoadL.msg.En_US.2.2.0.8.bff
/aix/fixes/v4/other/sx25.tcpip.1.1.5.4.bff
/aix/fixes/v4/other/sx25.tcpip.1.1.5.5.bff
/aix/fixes/v4/os/bos.mp.4.3.3.79.bff
/aix/fixes/v4/os/bos.mp.4.3.3.80.bff
/aix/fixes/v4/os/bos.mp.4.3.3.83.bff
/aix/fixes/v4/devices/devices.pci.14108c00.rte.4.3.3.53.bff

notice the different directories.

here is the directory that only the files need to be placed in.

/datastore/ibmfixes/IY12345

can anyone figure out how to do this using aix standard ftp??

Please Help.. thanks..
 
You need something along the lines of:

ftp -ivn remote_host << EOF
user anonymous username@email.address
lcd to local directory where you want the files
cd to remote directory
get files or mget files*
cd to other directory
get files or mget files*
bye
EOF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top