I was wondering if its possible to copy files from my Linux server onto my Windows server. I have seen other methods such as pscp and winscp but they involve the commands being ran on the Windows machine. What I am trying to do is somehow do the copying while I am on the linux machine.
you should be able to script smbclient as part of a script
smbclient -A authfile //windows_machine/D$ -c 'cd \\PATH\TO\Directory; get "Filename.txt" myfile.txt'
where authfile would be
username = <myusername>
password = <mypassword>
This would assume File Sharing enabled on the Windows Machine, and samba installed on the linux side. //windows_machine/D$
is the D Share. but you could replace it with whatever share you create.
or you could install an FTP server on your windows machine and can either script an FTP client or use something like curl || wget