I apologize, but I've fixed my script after reading this URL:
https://www.itprotoday.com/it-security/scripting-password-prompts
https://www.itprotoday.com/it-security/scripting-password-prompts
@echo off
for /f %%i in ('realdate.com /d') do (set DT=%%i)
md c:\LOGFILES\%DT%
set /p input=Type password:
"C:\Program Files\WinSCP\WinSCP.exe" /console /script="C:\auto_ftp.txt"
C:\auto_ftp.txt I changed all the logins to use the following
user:%input%@exampleserver1
test_call.bat):
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"
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
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?