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 biv343 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 from Unix to NT

Status
Not open for further replies.

sctxms

Technical User
Jan 29, 2003
19
US
I have some code that will transfer a file from Unix to my NT server the problem I am have I need to transfer multiple Archive log files automatically ever 15 minutes here the piece of code I have currently working manually

ftp -n -v 555.55.555.55 <<EOF
user Domain/xxxxxx password
put arch_0000003646.arc.Z arch_0000003646.arc.Z
quit

EOF

any help would be greatly appreciated from this unix newbie

 
Hello,

First thing that comes to mind is to cron this process. Put this FTP process in a script, which I think you did since you have EOF. Just put the above in a file and save it, make sure you give it the right permission by doing chmod on this file that you save.

Now add your file to a crontab, do a man on cron and it will show you how to. By cronning, you can schedule this to run per your preference.

Hope this helps or puts you on the right direction.

 
Thanks but I am still a bit confused when it comes to grabbing multiple file with different names with the put command how do I incorporate a search for the files since the names will be constantly changing?
 
For multiple files you can use [tt] mput arch_*.arc.Z [/tt]

You will have to use the [tt] ftp -i [/tt] option to disable interactive prompting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top