I have a simple script that loads ftp, the main thing is that I want to pass parameters such as host name, username, password, etc. to file bat.
This is my script.
@ftp -i -s:"%~f0"&GOTO:EOF
open %1
%2
%3
!:--- FTP commands below here ---
lcd "%4"
cd %5
binary
put "%6"
disconnect
bye
Now, when I call the script from the command line and pass in %1, %2... the content %1, %2will be replaced by my command line parameters. This is my command line:
ftp.bat "first" "second" "third" "forth" "five" "six"
Instead %1it becomes first, %2it becomes second, etc., it %1remains %1, so in essence I open the ftp side with a name %1that is completely meaningless.
Anything I'm doing wrong?