Discussion Locked

FTP Auto Connect

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

For winodws 98, how do creata batch file to ftp an ip address by setting the user and password instead of prompting for the user and password ?

Thank you

5 replies

by cesser

Just add a << to your FTP excute line.

Like:

ftp www.ftp.com << c:\userpass.txt

c:\userpass.txt would contain:
username
password

Chris Esser

by tysonmathews

You will actually have to have 2 files do do this. one will be the actual batch file and save as ?.bat and the examples will need to be changed for your site to log into and such.

bat file (save as ftp.bat or what ever.bat
____________________________
ftp -s:text.txt
pause
_____________________________

then the text file which needs to be in the same folder as the batch file. must save as text.txt unless you change the file name in your bat file.
_________________________________
open ftp.mcafee.com
anonymous
myuserid@myhost.com
lcd C:\windows\desktop
binary
mget /pub/antivirus/datfiles/4.x/*.zip
y
bye
___________________________________

Now this was written to have it log into mcafee and download the most updated dat file and download it to my desktop.

This discussion is closed to new replies.