I´d like to make Windows .cmd script file. One of its commands makes use of the ftp command. When I execute the batch script, the commmand prompt does not wait for the user to type his user/password, so the next commands are not properly executed. How can I make it to pause?
Thanks.
Edited:
My question was more related to the interactive use of the command (-i option) than the automatic login (-n option). I want to wait for the user to enter their credentials.
Also, I have seen that by typing the command:
ftp -n -i -s:myFtpCommands.txt 192.168.0.20
and that myFtpCommands.txt contains:
use myUser
mget *
bye
There is no need to type the password to get files. Where is the associated security problem?
You could ask the user for their details before hand, then build the command file based on their input.
With regards to the auto login, this is a feature of FTP, it’s an anonymous login, that is setup on FTP servers to allow this sort of access.
Whoever setup the FTP server would be able to control the accounts that are allowed to be used to access the server, and the permissions on the files that they don’t want everyone to have access to.