Skip navigation

How do I automatically FTP using NT?

A. I use a basic script to update my main site and the mirrors using two batch files. The first consists of a few lines:

d:
cd \savilltechhomepage
ftp -i -s:d:\savmanagement\goftp.bat

The -i suppresses the prompt when performing a multiple put, and the -s defines an input file for the FTP like:

open ftp.savilltech.com - the name of the FTP server
johnny
- username
secret
- password
cd /www
- remotely move to a base directory
lcd download
- locally change directory
cd download
- remotely move to a sub directory of the current directory
binary
- set mode to binary
put faqcomp.zip - send a file
cd ..
- move down a directory remotely
lcd ..
- move down a directory locally
cd ntfaq
lcd ntfaq
mput *.html
- send multiple files (this is why we needed -i)
close - close the connection


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish