Topic "Command-Line Options"

Author Message
Ryan
[View user's profile]

Joined: 2007-07-30
Posts: 2
Location: WI
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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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.
_________________
Martin Prikryl
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.
Ryan
[View user's profile]

Joined: 2007-07-30
Posts: 2
Location: WI
Sorry, that last post was made by me. I got logged out somehow.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License