Reputation: 7937
I have a batch file which contains the following line...
ftp < ftpcom.txt
The ftpcom.txt file contain something along the lines of...
open ftp.mysite.com
myusername
mypassword
cd public_html
cd subdirectory
mput afile.txt
y
quit
This has been working perfectly on my windows 10 PC for some time but I have been temporarily forced to switch to an old windows 7 PC and now it gets stuck at the password. I.e. I see that it has connected to ftp.mysite.com and has read my username and is now asking for the password (I see the text "Password:") but I see nothing after that. The DOS box is just stuck - as if it was waiting for someone to type in a password. Maybe there is some windows 7 feature whereby ftp refuses to accept a password form a file?
Obviously this might not be a windows 7 vs. 10 issue at all - maybe it just some incorrect configuration setting.
Upvotes: 0
Views: 68
Reputation:
From cmd.exe
if you run ftp /?
you get some help. Let's focus on one particular part of this help output.
-s:filename Specifies a text file containing FTP commands;
the commands will automatically run after FTP starts.
Upvotes: 1