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

darlington.cam

Batch file to get file using stored session

I'm attempting to create a batch file to get a file without using plain text username and password. I was hoping to use saved sessions with the hashed password but can't figure out the correct syntax

The following currently works, but how do I use the stored .ini and eliminate my password?

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" /command "open sftp://user:pass@siteid/"
"get -lastest /media/*.jpg C:\media\"
"exit"


I've tried adding /ini="C:\media\WinSCP.ini" where I've stored the config, but I don't know how to apply it correctly and change how it opens