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

Christoph

Martin,

I really have to appologize! The file does exist but it's named connect.txt.txt (some remaining typing from the old days with DOS; that's what's happening if project managers try to work outside their core competences ...).
Long story short: It's working fine now

Again sorry about that and thanks for following up on this anyway!
/Christoph
martin

Re: PostRe: having similar problem

Christoph wrote:

So, what about that error-message; do you have an idea?

I guess that it is pointless to ask you whether the file really exists and whether you have read access to the file :-)
Christoph

PostRe: having similar problem

Hi Martin

Well, one has to differntiate:

- "winscp3.exe /console /script=c:\programme\winscp3\connect.txt" is resulting in that very short popping window Yves already mentioned while

- "winscp3.com /console /script=c:\programme\winscp3\connect.txt" results in the error message "cannot open file c:\programme\winscp3\connect.txt"

Moreover: "winscp3.com xxx@host.tdl /console (xxx@host.tdl is the default session in the GUI) is properly opening the session ending with the command line on the console; the same with .exe instead of .com just with the difference an addition window is opened.

So, what about that error-message; do you have an idea?
martin

Re: having similar problem

So you also get the "EAccessViolation" error?
Christoph

having similar problem

Hello all

Using Win2000 I'm facing the same issue: Using plain command "winscp3.exe /console /script=connect.txt" from command line is showing same result as Yves is reporting (while script-file is an adapted copy from the documentation-site). I went done to 3.7.6 as recommended but no change.
What I found interesting is the fact that the script command is not listed when typing help on the console (started with winscp3.exe /console). Does this ev. have any meaning or did I somehow miss an important part in the documentation? Thanks for your efforts

/Christoph, Berne-CH
martin

You probably use 3.8 beta. Please downgrade to stable version 3.7.6.
Yves

ok, my fault.

Now I get the following:
C:\Programme\WinSCP3>

batch        on
confirm      off
EAccessViolation
Keine Sitzung
transfer     binary
Keine Sitzung
Keine Sitzung
Yves

Hi,

thanks for your replay.

I get the error message

Cannot open file script.scp


The script is in the WinSCP folder.
martin

Re: First steps in scripting

Run the script from already opened console window (type 'cmd' into start/run box) to keep the results once the script finishes.
Yves

First steps in scripting

Hi,

i have tried my first steps in scripting but i was not successfull.

I used the sample script and changed it a little bit like this:

script.scp

# Automatically answer all prompts negatively not to stall

# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# Connect
open myuser:mypassword@myhost
# Change remote directory
cd /folder
# Force binary mode transfer
option transfer binary
# Download file to the local directory c:\
get config.h c:\
# Disconnect
close
# Exit WinSCP
exit


To execute it i used to following command:

c:\programme\winscp3\WinSCP3.com /console /script=script.scp

After this a window has opened and closed fast.

A manual connect by winscp is possible.

Whats my mistake? :?

Thanks for help!