for /f %%i in ('realdate.com /d') do (set DT=%%i) md c:\LOGFILES\%DT% "C:\Program Files\WinSCP\WinSCP.exe" /console /script="C:\auto_ftp.txt"
For each of the servers that I am connecting to and downloading the files for, I use the same username and password. So, yes, in the solution as it stands now I must type in the password each time the script changes servers. See something close to C:\auto_ftp.txt below.
open user@exampleserver1 get /logfiles/logfile.log c:/logfiles/%DT%/exampleserver1.logfile.log close open user@exampleserver2 get /logfiles/logfile.log c:/logfiles/%DT%/exampleserver2.logfile.log close open user@exampleserver3 get /logfiles/logfile.log c:/logfiles/%DT%/exampleserver3.logfile.log close
And so forth. For security reasons, I do not want to put the password into the C:\auto_ftp.txt file. Is there a way to have test_call.bat prompt me for the password, store that as a variable, and then C:\auto_ftp.txt can use the variable for the password?
Thanks for your time.