Saved Bookmarks
| 1. |
Solve : Log in to a ftp server using a batch file? |
|
Answer» Can any one please help me to login to a FTP server using a batch file and also in a telnet server please reply to my email id [emailprotected] i cannot give my user name in the field can you please help me please give me a "Test" file with commands No, posting once would have been enough. Why don't you go spam somewhere else?depending in the ftp server you're trying to CONNECT to and if you are behind a firewall, you could run into a lot of issues but here is a simple way of doing it create a batch file ftptest.bat and put this command in it "ftp -s: test1.txt" then create a text file called test1.txt and put these commands in it(note: single quotes imply values you need to insert) " open 'ipaddress of ftp server' 'username' 'password' bin mget 'name of file or files' close " and when you're done stop spammingHae thanks a lot yea right ill try thisYou will need to open the Telnet to do this, otherwise the commands are useless. they are not commands without using TelnetI am trying to do a similar thing, except I am using telnet instead of ftp. I can't get it to work. my batch file: telnet < telnet-SMTP.txt my telnet-SMTP.txt file: open smtp.comcast.net 25 HELO comcast.net MAIL FROM:<[emailprotected]> RCPT TO:<[emailprotected]> DATA Subject:my test message From: [emailprotected] To: [emailprotected] hello from user1. QUITwindows telnet client is not really meant for scripting telnet. I guess I was naive in assuming that ftp and telnet were simply black-box programs that wrote output and read input from a terminal (or DOS window). If one could predict the exact sequence of input/output values, then the INTERACTION could be programmed in a script. You are stating that ftp was programmed in a special way to allow this to HAPPEN, whereas telnet was not. That gives rise the question "How does one write an interactive program (say in C) whose input/outputs CAN be scripted?" If this can be done, what would a typical script look like (with I/O redirection operators)? I am not being argumentative, I just want to understand this issue. Thanksthat's why there are better languages out there that has the capability to script telnet and ftp. eg Perl. check this for eg on FTP. Check this for EXAMPLE on telnet. |
|