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

martin

Re: Configure ini file on User Name

So show us code and INI file that you believe are correct (without the typos). And corresponding session log file.
KSNHITESH

Configure ini file on User Name

It's a typo error while deleting the credentials.
My goal is to hardcode the SFTP connection details(id and Password) in the config file and call the command open <> with only the hostname.
martin

Re: Configure ini file on User Name

Sorry, I do not understand the purpose of the INI file. And your example is far from complete.

In any case your command-line is wrong. First, it should be winscp.com, not win.com. And you are missing the /command switch:
https://winscp.net/eng/docs/commandline#scripting
KSNHITESH

Configure ini file on User Name

I am running on the latest version of WinSCP. My requirement is as follows.
I have created three individual files Windows Batch Files for Upload/Download/Delete.
I configured the .ini file in such a way if the user name is given it should connect to my SFTP server based on the details saved in the file. I have added the below code at last. We are having a custom port number.
[Sessions\Server]
HostName=XXXXXXX:XXXX
PasswordPlain=XXXXXXX

@echo off
<path>/win.com /ini="<path>" "open %1" exit.

Not sure where it's going wrong. System considering Username as Hostname and getting terminated. No special chars in the password.