Computing.Net > Forums > Disk Operating System > FTP

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

FTP

Reply to Message Icon

Name: Roosevelt
Date: November 6, 2000 at 16:27:09 Pacific
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: john westerman
Date: November 7, 2000 at 05:26:14 Pacific
Reply:

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 %1 echo 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.


0
Reply to Message Icon

Related Posts

See More


Serial port program Just a silly question!!



Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: FTP

Ms-dos ftp www.computing.net/answers/dos/msdos-ftp/13009.html

need ftp voyager 6.0.0.5 www.computing.net/answers/dos/need-ftp-voyager-6005/1278.html

comparing files via FTP connection www.computing.net/answers/dos/comparing-files-via-ftp-connection/14052.html