Copying the files to Windows server from UNIX server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Copying the files to Windows server from UNIX server
# 1  
Old 12-02-2014
Copying the files to Windows server from UNIX server

Hi Team,

I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows.

I am very new on this concept.

Could you please help me or guide in installing or setting up the setup to transfer the files from unix to windows.

Thanks
# 2  
Old 12-02-2014
cygwin for windows will allow you to scp to windows.
Other options could be to look into ftp daemons for windows or use an smb (aka Samba aka CIFS) client on unix to push the files to a windows share.
# 3  
Old 12-02-2014
cygwin sshd server is very good:

Cygwin SSHD HowTo

However, you might find some Windows Server Admin types are very anti cygwin. which is a shame as if you get sshd setup on windows your scp script for unix to unix should work unix to windows with little or no changes.

You could also use Microsoft FTP server:

How To Set Up an FTP Server in Windows Server 2003

With a .netrc file scripting ftp transfers is fairly doable but you will need to be careful on how the script is implemented to avoid deleting files not yet sent or sending a partially created file.

This thread may be of use:

Need a Shell Script for FTP
# 4  
Old 12-02-2014
Thanks for your reply. I cannot use Ftp as it was not secured. I need only secured transfer. I installed Cygwin on my windows machine and I tried to transfer file from windows or vice versa. it didn't worked for me.

Code:

 Tharun agarval@ldnsvr ~
 $ scp test_2unix jkaran@10.131.23.71:/home/jkaran
 -bash: scp: command not found


Last edited by Don Cragun; 12-02-2014 at 09:53 PM.. Reason: Remove SIZE and duplicated COLOR tags.
# 5  
Old 12-02-2014
Did you install these packages when installing cygwin:

Net --> openssh
Admin --> cygrunsrv (required only for unix -> windows)

For unix -> windows you will also need to follow the Cygwin SSHD HowTo document
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies

2. Solaris

FTP-ing files from Windows server to UNIX server

I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output. Is it possible to transfer files from Windows server to unix server through any shell script? If so can you please help me with the details. Thanks in... (8 Replies)
Discussion started by: ssk250
8 Replies

3. Shell Programming and Scripting

Sftp some files from windows server to UNIX server

hi i need to transfer some files from windows server to unix server using SFTP. but before transferring the files, i need to check the existence of a particular file in the remote directory (say r_dir1). if the file is present, then SFTP all the files. after SFTPing the files from the remote... (1 Reply)
Discussion started by: vinit raj
1 Replies

4. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

5. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How to copy files from Unix server to Local (6 Replies)
Discussion started by: win4luv
6 Replies

6. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How do i copy files from Unix Server to my Local Desktop.. ANy ideas..please suggest....V Urgent. (1 Reply)
Discussion started by: win4luv
1 Replies

7. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

8. Shell Programming and Scripting

FTPing files from unix server to windows server

Hi, Below is the script which ftps the file from unix server and putting in a different directory(but on unix server) How can i ftp the files from unix server and to place in a secure location on windows server? what changes needs to be done to the below script? How can this be... (1 Reply)
Discussion started by: venkatesht
1 Replies

9. Shell Programming and Scripting

writing script in UNIX for copying files in two server

can anyone help me in writing script in UNIX for copying files in two server from the third server after checking the files in the third server and if there is anything new in the third server automatically it should be added to the rest of the two servers and if same file is existing in the two... (4 Replies)
Discussion started by: REKHA09
4 Replies

10. UNIX for Advanced & Expert Users

Copying files between 2 Unix server

Is there a simple way to copy data from one server to a different server? Seems that if 2 servers are on the same network, there should be a simple way to copy between the two. Not just one file. I need to copy a whole directory with subdirectories from one server to a different one. I... (9 Replies)
Discussion started by: Docboyeee
9 Replies
Login or Register to Ask a Question