• Shell Scripting for Dynamic folder transfer


    #!/bin/sh
    HOST='
    ftp.example.com'
    USER='
    ftpuser'
    PASSWD='
    P@ssw0rd'
    FOLDERNAME=$(date +%d%b%Y)
    LOCALPATH='/localpath/'
    DIR='/ftp_foldername/'
    ftp -inv $HOST <<END_SCRIPT
    quote USER $USER
    quote PASS $PASSWD

    binary
    cd $DIR
    mkdir $FOLDERNAME
    cd $FOLDERNAME
    lcd $LOCALPATH/$FOLDERNAME
    mput *
    quit
    END_SCRIPT
    exit 0
  • 0 comments:

    Post a Comment

    FAVOURITE LINE

    To steal ideas from one is plagiarism. To steal from many is Research.

    ADDRESS

    Mumbai , Maharashtra

    EMAIL

    shikha.pathak6@gmail.com
    shikha.the.swt.pari@gmail.com

    Skype

    shikha_pari