Topic "Issue while Copying from Windows to Linux through script"

Author Message
[View user's profile]

Joined: 2014-11-20
Posts: 1
Location: Melbourne
I am using below script to copy from Linux to windows to copy XML files and its working perfectly fine although when i want to do the same copy from Windows to linux it doesnt work.

open sftp://username:password@linux server address -hostkey=""
option echo on
option batch on
option confirm off
option transfer binary
cd "/sasdata/prod/RCentre/HTML/"
lcd "C:\RC\Monit\HTML - Win7\"
get Cat.xml
get XML.xml

while copying from windows to linux, i am just changing lcd to cd and vice versa.

I used different options like get -resume or get -resumesupport. although nothing worked. Please help
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
To upload a file, you need to use put:

On the other hand the cd and lcd should stay the same.
Martin Prikryl

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License