I was trying to run the following script in command line in windows xp but I couldn't make it :

C:\..\ftp  -s:"%~f0"&GOTO:EOF
open someweb.com
username
password
pwd
bye

the following runs ok:

ftp>@ftp -i -s:"%~f0"&GOTO:EOF
open someweb.com
username
password
pwd
bye

but I am trying to achieve it with command line. Is there a way to do so?

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

You can’t do it directly on the command line, but you can use the command line to build a file that you can send as input to ftp:

C:\>echo open someweb.com >input
C:\>echo next ftp commmand >>input
C:\>echo another ftp commmand >>input
C:\>ftp -i <input
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.