Schedule a session as a task

Advertisement

natzol
Joined:
Posts:
2
Location:
Florida, USA

Schedule a session as a task

Hello

I am trying to create a script to be executable via batch file on NT schedule. Found following samples for a command line:

:: winscp3.exe stored_session

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

Is there a way to create a session with all of those parameters so Task will only execute the line like:

winscp3.com SessionName1

Reply with quote

Advertisement

natzol
Joined:
Posts:
2
Location:
Florida, USA

Great! Thank you for pointing in the right direction.
I exported settings from registry and found session record:

[HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions\MySite]
"HostName"="www.mySite.com"
"PingType"=dword:00000000
"LocalDirectory"="C:%5CBatch"
"UpdateDirectories"=dword:00000001
"Password"="A35C....21"
"UserName"="username"
"PublicKeyFile"="C:%5CBatch%5CprivateKey.ppk"

It also took a while to find how to switch from Registry settings to INI settings (Panel\Preferences\Other General Options\Storage\Configuration Storage..) Once I changed it - I also found INI file and my session settings in it:

[Sessions\MySite]
PingType=0
HostName=www.mySite.com
Password=A35C....21
UserName=username
PublicKeyFile=C:%5CBatch%5CprivateKey.ppk

Plus I changed
[Configuration\Interface]
RandomSeedFile=.\winscp.rnd
DDTemporaryDirectory=.\


So do you recommend use INI file over Registry? Or overwise export/import registry file each time I need to switch the session so program wont get tied to a current user settings?

Reply with quote

martin
Site Admin
martin avatar

natzol wrote:

So do you recommend use INI file over Registry? Or overwise export/import registry file each time I need to switch the session so program wont get tied to a current user settings?
INI file is probably easier to use for your task.

Reply with quote

Advertisement

You can post new topics in this forum