Simulate Enter in Batch

2

I have a script that automatically downloads the backup of an S3. The bad thing is that it asks for a confirmation with an enter after entering the password so it is not 100% automatic. Does anyone know if there is any way to simulate an enter?

I've tried using the type of a .txt with a single enter but it has not worked:

type archivo_con_un_enter.txt | script.bat

Here is the script:

set ano=%date:~6,4%
set mes=%date:~3,2%
set dia=%date:~0,2%
cd %ProgramFiles%\S3 Browser
s3browser-con
s3browser-con.exe download Server:[password] bucket/%ano%-%mes%-%dia%/ C:\Backup
    
asked by blee1d 02.05.2018 в 16:55
source

1 answer

0

It seems that the password should go after Server, so that (without brackets)

s3browser-con.exe download Server:mi_password bucket/%ano%-%mes%-%dia%/ C:\Backup

Did you try it this way?

If not, another option would be to try

echo mi_password|s3browser-con.exe download Server:[password] bucket/%ano%-%mes%-%dia%/ C:\Backup
    
answered by 31.07.2018 в 11:00