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: Windows to Linux= :-) ---- Linux to Windows = ???

jwb1980 wrote:

I just change the sync directions.

That's the correct solution.
jwb1980

Re: Windows to Linux= :-) ---- Linux to Windows = ???

OK this is for anyone in the future (including me :mrgreen: ), I figured it out. So instead of racking my brain how to make Linux the local and Windows the remote. I just change the sync directions. It ends up like this:
option batch abort
option confirm off
open sftp://username@server.com -hostkey="ssh-rsa2@22:server.com =0x23,bla bla, bunch of numbers, you get it"
lcd /Linux-root/dir-path
cd "\\Windows_server\Share"
lls
ls
synchronize local -filemask="*.txt |*<1D ; */"
Exit
jwb1980

Windows to Linux= :-) ---- Linux to Windows = ???

If this is not the correct place to post this question I apologize in advance please just give me a link to where I should post this question. I have three tasks, 1st transfer file from a Window network share to a Linux server share. 2nd transfer files from a Linux share to a Windows share. Both need to be automated. Now I have a the Windows to Linux running smooth, no real problems there its is:

WinSCP.com /console /script=WinSCP_CMDs.txt
option batch abort
option confirm off
open sftp://username@server.com -hostkey="ssh-rsa2@22:server.com =0x23,bla bla, bunch of numbers, you get it"
lcd "\\Windows_server\Share"
cd /Linux-root/dir-path
lls
ls
synchronize remote -filemask="*.txt |*<1D ; */"
Exit




I'm guess was that the Linux to Windows transfer would be:

WinSCP.com /console /script=2ndWinSCP_CMDs.txt
option batch abort
option confirm off
open sftp://username@server.com -hostkey="ssh-rsa2@22:server.com =0x23,bla bla, bunch of numbers, you get it"
lcd /Linux-root/dir-path
cd "\\Windows_server\Share"
lls
ls
synchronize remote -filemask="*.txt |*<1D ; */"
Exit

But I'm getting the following error:
Error changing directory to '\\Windows_server\Share'.
Cannot get real path for '/Linux-root/dir-path/\\Windows_server\Share'.
No such file or directory.
Error code: 2
Error message from server: No such file
/Linux-root/dir-path


I'm assuming there is just something that I'm missing, or there is a problem with my syntax. Any and All help would be appreciated. ---Thanks in Advance