Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Is there a way I can automatically ftp to another computer using a batch file, i.e. ftp ipaddress with user name anonymous and hit enter for the password. My problem is that when the batch file has started it hangs at the prompt for the user name. Is there a way to predefine the username and Password in the batch so it automatically logs me in?
I thank you for your help
Roro.

you might be able to pipe the username into the batch file either using a text file or batch parameters, for example:
@echo off
cls
rem ftp into a pc
c:\ftp\ftp.exe %1 /username=%2 /pass=%3
echo done!you would run the file like this;
c:\> connect.bat daves_pc anonymous
the % variables (%1 to %9) correspond to items in the command line. %1 is the first, %2 the second and so-on...
ALternatively, create a text file with the username and password, call it username.txt. Create this batch file
@echo off
cls
rem ftp to a remote pc
c:\ftp\ftp.exe %1echo done! using the < (less than) symbol forces output from the specified file / program to be piped into something that is waiting for an input.
Hope that helps in some way.
John.

![]() |
Serial port program
|
Just a silly question!!
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |