Post a reply

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

Re: 4.1.9 documents /parameter use then why?

EMF wrote:

I've tried this on 4.1.8 and 4.2.4beta.

It works since 4.2.2 only. So it should work with 4.2.4. Please post your complete script and output of the console running it.
EMF

Re: 4.1.9 documents /parameter use then why?

I am having a similar issue: testing a very simple script and it also insists on inserting %1% into the ls statement: (Pardon the paraphrasing on results; I don't have the window in front of me at the moment.)
winscp.exe /console /script=test.txt /parameter Temp

open user:pass@host
ls %1%

'%1%': No such file or directory.

I've tried this on 4.1.8 and 4.2.4beta.
martin

Re: 4.1.9 documents /parameter use then why?

Apurva Shukla wrote:

a) it would not let me pass parameters to script. The documentation contains not one single working example.

What about this one?

b) It wont accept hostkey automatically. I know there are security issues, but I have to log onto 400 machines in a loop and pick out select files from them.

It does, use -hostkey switch.
Apurva Shukla

4.1.9 documents /parameter use then why?

The latest stable release has the use of /parameter then why is that the script cannot be passed any arguments.

I have a scenario where I have to write a script where I log onto a server, check the directory listing. Choose which files to pick up and then download them on a regular basis.

WinSCP ver 4.1.9 is however causing many problems in this small effort.
a) it would not let me pass parameters to script. The documentation contains not one single working example.
b) It wont accept hostkey automatically. I know there are security issues, but I have to log onto 400 machines in a loop and pick out select files from them.
hisnamewasjaan

Sorry to waste your time...

It seems the WinSCP version I was using did not support /parameter.
Upgrading to 4.2.3 resolved my problem.
/jan
hisnamewasjaan

problem passing parameters using /parameter param1...

Hi
I'm trying to do something I would have thought was simple

WinSCP.exe /console /script=copyToP4.txt /parameter target\APReporting.war

And in copyToP4.txt at some point I have:

put %1%

but the console always says:

File or folder '%1%' does not exist.

So it seems that the parameter is not being resolved? What am I missing?
My WinSCP version is 4.0.4 (build 346).

Thanks Jan