Command-Line Options

Advertisement

Ryan
Joined:
Posts:
2
Location:
WI

Command-Line Options

For this syntax to create a session:

winscp.exe [(sftp|ftp|scp)://][user[:password]@]host[:port][/path/[file]] [/privatekey=key_file]

Is there anyway to set the local directory? I want to be able to use the command-line to log into a certain local directory and remote directory. I would create it as a session but the local and remote directories change everytime.

Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

Re: Command-Line Options

I guess you create the command-line automatically somehow. You can create the session also automatically. The easier is to generate INI file that modifying registry.

Reply with quote

Guest

Yes, I create the command line in a C# program. If the user wants to launch WinSCP they can, but the folders will be different every time. I can let it go to the default folder every time, but it would be nice to have it open in the right folders.

How would I create the session automatically to have WinSCP open to a different local folder? Looking at the command-line options, I did not see a way to do this.

I am not too familiar with INI files, but I am sure I figure that out.

Reply with quote

martin
Site Admin
martin avatar

You should start by going to preferences and saving your configuration into an INI file. Then inspect the created INI file to see how WinSCP defines the sessions.

Reply with quote

Advertisement

You can post new topics in this forum