ftp batch file

Discussion in 'Programming/Scripts' started by poisen, Mar 25, 2008.

  1. poisen

    poisen New Member

    Hey everybody,

    I wanna transfer a tar.gz that I've created to a ftp server automatically using a batch script that is run by a cron job. I just can't get it to work, googled around the last 2 days and just couldn't find anything that works. The problem is that when I open a ftp connection, I am asked for a username and password and I just don't know how to automatically get that entered.

    What I wanna do:
    ftp xx.xx.xxx.xx
    put /tmp/filename.tar.gz
    maybe somebody can help me out here. I did get everything working before using scp, but this time the only possiblity is using ftp, sadly.

  2. topdog

    topdog Active Member HowtoForge Supporter

    You can use expect to do that
  3. poisen

    poisen New Member

    Thank you for that info, also found another solution using ncftp :)

Share This Page