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

Author Message
mahendra_sharma
[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
close
exit

---------------------------------------------------------------
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
To upload a file, you need to use put:
https://winscp.net/eng/docs/scriptcommand_put

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

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License