Showing posts with label ftp. Show all posts
Showing posts with label ftp. Show all posts

Tuesday, September 25, 2012

Auto FTP transfer in shell script

Credit to Sim Wei Chieh

How to create shell script to auto ftp transfer

Objective:
- Create a new folder each time perform ftp transfer to target server with a set of files through wildcard.

Here is the code for autoftp.sh:

Time=$(date +"%F_%HH%MM%SS")
ftp -n <        open
        user
        binary
        prompt
        cd /home//
        mkdir timeoutput_top_error_log_$Time
        cd timeoutput_top_error_log_$Time
        lcd /root
        mput setoffilenames*
        bye
EOF



Wednesday, May 30, 2007

How to PERL FTP

This week I brought FTP code which works using PERL:

This FTP code works on both Windows and UNIX environment.
This is a nice part of PERL :D
See the example code below: