Post a reply

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)


Topic review


>> e.g. from Windows command line, Windows batch file or Windows shortcut

OK thanks, this is the information I was missing.

Re: Scripting - where to start, part II

If you run (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 /script=script.txt (e.g. from Windows command line, Windows batch file or Windows shortcut).

Again see

Scripting - where to start, part II

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 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: /script=example.txt

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

unknown command ''.

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

Thanks in advance.