Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

briandent

Batch file to synchronize a folder without a password

I have a batch file that synchronizes a folder to another location using TLS/SSL Explicit encryption. I have the credentials stored in the .bat file and I have a session setup in the GUI. But for security I'd like to use the session rather than the command line including the credentials. I've been through the doc but I'm just not seeing how to do this. Is it possible to pull the session info from the GUI?

This is from the batch file with some of the lines truncated for readability:

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="%~dp0%~n0_winscp.log" /ini=nul ^
/command ^
"open ftpes://admin:password@x.y.com/ -certificate=""9a:..."" -rawsettings ProxyPort=1" ^
"lcd E:\BERYL\BACKUPS" ^
"cd /BACKUPS" ^
"put -filemask=""*.log>1D;*.7z>1D"" -neweronly *" ^
"exit" >> %~dp0%~n0.log