Automatic acceptance of a TLS (self-signed) certificate

Advertisement

Artyom
Joined:
Posts:
3
Location:
Latvia

Automatic acceptance of a TLS (self-signed) certificate

Hello! I'm trying to connect to ftp server using command prompt. When I connect it requires to accept certificate manually (press (Y),(N) or (C)copy key ). I need it to be accepted automatically without my participation. I've read some topics about that and saw such commands as "certificate-*" etc. But I can't do that automatically. Here is my code:

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\Users\skolnieks\Desktop\WinSCP.log" /ini=nul ^
/command "open ftpes://user1:12345@192.168.12.28/" ^
"lcd C:\Users\skolnieks\Desktop" ^
"cd /" ^
"put *.xlsx" ^


"exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)

exit /b %WINSCP_RESULT%

Reply with quote E-mail

Advertisement

Artyom
Joined:
Posts:
3
Location:
Latvia

Thank you very much! It really helped me! Now i need to put all files which has been updated/changed last 15 minutes but if they have same name they must be replaced by new.I mean there are files with same name on my computer and on comuputer which I should put it. I've put it and after changed it. And when i'll start a programm again he will put him again but replace by new version. There should be not 2 files (old and new) but only new. I've found this one: put -filemask="*>=1D" *
I need to put *.xlsx files. Can u show me please how it will be correctly written that it worked. I've wrote like this: "put *.xlsx" -filemask="*>=15m" ^. Is it right?

Appreciated for help!

Reply with quote E-mail

Advertisement

You can post new topics in this forum