Topic "Scripting - where to start, part II"

Author Message
cag8f
[View user's profile]

Joined: 2014-06-25
Posts: 4
This is a continuation of a previous post of mine. I'm getting started with scripting in WinSCP. I'd like to execute a simple script that prints 'hello world' as an output. I now understand how to open winscp.com and run simple commands. I'd like to run a simple script now:

echo hello world

Winscpt documentation indicates that, to run a script, I need to enter:

winscp.com /script=example.txt

But where do I enter this? If I enter this at the winscp.com prompt, I am met with an error:

unknown command 'winscp.com'.

I encounter the same error if I first open a session, then enter that command.

Thanks in advance.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
If you run winscp.com (without arguments), you start interactive scripting mode, where you can type/test commands directly, e.g. you can type your echo hello world.

If you want to test script, you save the echo hello world command to e.g. script.txt and execute it with winscp.com /script=script.txt (e.g. from Windows command line, Windows batch file or Windows shortcut).

Again see http://winscp.net/eng/docs/scripting#using_scripting
cag8f
[View user's profile]

Joined: 2014-06-25
Posts: 4
>> e.g. from Windows command line, Windows batch file or Windows shortcut

OK thanks, this is the information I was missing.
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