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
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