Post a reply

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)


Topic review

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\" /command "open sftp://user:pass@siteid/"
"get -lastest /media/*.jpg C:\media\"

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