Copying a file from a Windows server to a Linux server from the Windows command line
Posted on 2007-10-18
I need to copy a file from a Windows Server 2003 web server to a linux server. I will be doing this from a VB program, but I thought I would just launch some command line statements. I'm thinking of using winscp. I've tried to do a copy command like this...
winscp ptest.script root:email@example.com home/scripts/ptest.script
The problem is that I don't know how to specify the file on the Windows server (which is where the command is being issued. Since I'm on running the command on the server and I'm logged in, I'm thinking I don't need to specify a username and password. Also, if there is a better utility to use to copy this file, I'm all ears. The file is on a Windows web server so maybe there is an easier way to push it to the Linux server. It doesn't necessarily need to be done at the command line, but it does need to be something I can put into my VB program. In other words, I know I can transfer the file easily using WinSCP from the GUI, but I can't automate that within my VB program.
Thanks for the help!