Topic "pass new folder/directory name on cmdline for stored session"

Author Message
nitram
[View user's profile]

Joined: 2010-06-16
Posts: 7
I am running ver 4.2.7 on WinXPSP3. I am submitting this as feature request because I cannot find a way to do this after studying the documentation and running numerous tests.

I want to open WinSCP.exe (GUI) to a saved session, but to a different folder than the session default, by passing a command line parameter for different folder. For instance, say I have a saved session called 'mysession' which includes pwd, and which has a default directory of /home/myfolder.

When I execute this cmd line:

WinSCP.exe mysession

it opens to the default directory for that saved session (/home/myfolder'). However, say I want to open a different folder, e.g. '/home/myfolder/subfolder/'. I would like to pass this different folder along with the saved session name on the cmdline, like this:

winscp.exe mysession /home/myfolder/subfolder/

I have tried to make this work, but it does not appear to be possible, hence the feature request.

I realize I can save a separate stored sessions for the same server, each with it's own default folder. However, when I change my server pwd, I need to change the saved pwd for each and every stored session to that server. I might have several if I have to save a separate session for each folder. I would be much easier to have a single saved session and be able to pass the folder path on the cmdline.

What I want is to have a single saved session then be able to open to different folders for this session by passing a cmd line parameters. I realize this can be done by invoking a new session on cmdline:

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

but this means I have to script my user:pwd whenever I call this. What I want is to use a stored session and just pass the folder on the cmdline, overriding any default folder saved in that stored_session.

I did think of one way to do it. I use an INI file, so I could parse/filter a copy of the INI, change the remote directory parameter for the relevant session, then pass that batch-edited INI filespec to WinSCP.exe on the cmdline. This works, but it would be much easier to just pass the directory on cmdline with the saved session name.

Chris
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Thanks for your post. This request is being tracked already.
_________________
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