Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

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.
natzol

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?
martin

Re: Schedule a session as a task

You can preconfigure the session from GUI. Please read this FAQ to avoid common mistakes.
natzol

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