Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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