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

Re: Writing a script in a batch file to fetch files from SSH

viki lingeria wrote:

Do I have to write the script some where in WinSCP?

You need to pass it to WinSCP using /script parameter. Please read documentation .
viki lingeria

Re: Writing a script in a batch file to fetch files from SSH

martin wrote:

I have no idea what you are doing. You need to execute the script via WinSCP, not directly (or whatever you are doing)!


Hi Martin,

I am writing the script in a batch file. i.e. in a .bat file extenstion.

Do I have to write the script some where in WinSCP?

Kinldy reply. I am aware my question might have sound stupid. But I am new to WinSCP and I desperately need to transfer files from one server to another.

Please assist.

Regards

Viki Lingeria.
martin

Re: Writing a script in a batch file to fetch files from SSH

I have no idea what you are doing. You need to execute the script via WinSCP, not directly (or whatever you are doing)!
Guest

Re: Writing a script in a batch file to fetch files from SSH

martin wrote:

viki lingeria wrote:

Have written the following code. But it does not seem to get the files from the server to my local machine.

And what does it do?


I run the batch file & it gets executed with out any error. Pasting the output file here

C:\># Automatically answer all prompts negativelly not to stall

C:\># the script on errors

C:\>option batch on

C:\># Disable overwrite confirmations that conflict with previous

C:\>option confirm off

C:\># Connect

C:\>open gstar:gstar@3.49.4.80

C:\># Change remote directory

C:\>cd home/data/fs/gstar/25_07_2005

C:\># Force binary mode transfer

C:\># Download file to local directory d:\

C:\>get gstar_currency.xml d:\

C:\># Disconnect

C:\>close

C:\># Exit WinSCP

C:\>exit

Frankly I am not sure where is the script going wrong. Is something missing in the script.

Regards

Viki Lingeria
martin

Re: Writing a script in a batch file to fetch files from SSH

viki lingeria wrote:

Have written the following code. But it does not seem to get the files from the server to my local machine.

And what does it do?
viki lingeria

Writing a script in a batch file to fetch files from SSH

Hi ,

I am trying to write a script in a batch file to fetch the files from SSH server.

Have written the following code. But it does not seem to get the files from the server to my local machine.

Can you please tell me what could be going wrong?

Code:
# Automatically answer all prompts negativelly not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with previous
option confirm off
# Connect
open gstar:gstar@3.49.4.80
# Change remote directory
cd home/data/fs/gstar/25_07_2005
# Force binary mode transfer
# Download file to local directory d:\
get gstar_currency.xml d:\
# Disconnect
close
# Exit WinSCP
exit

Where : gstar is the username and the password.

Your assistance would be highly appreciated.

Regards

Viki Lingeria