Solved

Copy file from UNIX to WINDOWS shared folder

Posted on 2013-05-15
5
863 Views
Last Modified: 2013-05-15
I need to create a script in UNIX that will copy a file from a UNIX directory to a WINDOWS shared folder.

The file myFile.txt is located in /unixServer/fileout/ and I need this file to be copied to a WINDOWS server /winServer/filein/.

Not sure where to start to create this script file for UNIX in order to do this.
0
Comment
Question by:Lee R Liddick Jr
  • 2
  • 2
5 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 250 total points
ID: 39168453
Try this copy command in Unix

cp /unixServer/fileout/myFile.txt  /winServer/filein/

Open in new window


You can put it in a file and that would be your script file.
0
 
LVL 76

Accepted Solution

by:
arnold earned 250 total points
ID: 39168505
Does your unix system access the share to which you want the data copied.

The suggestion farzanj is making presumes such access already exists.

If your unix has samba share and that is where this file is initiating the copy process from the windows side might be an option.

To answer your question in a complete manner, information on current access options is necessary.  You could also use pscp.exe within a batch file on windows to transfer file from a unix/Linux system.
0
 

Author Comment

by:Lee R Liddick Jr
ID: 39168913
It didn't like the cp command...
0
 
LVL 76

Expert Comment

by:arnold
ID: 39168948
If you kindly provide information on what options you have available.

This suggests that samba is not setup such that the unix system can access directly a windows share.
Alternatively
Try from the windows side:
copy \\unixserver\fileout\myfile.txt c:\
0
 

Author Closing Comment

by:Lee R Liddick Jr
ID: 39169138
I found out it was a permissions problem...I'm splitting the points for your time to respond.  Thank you both.
0

Featured Post

Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

Join & Write a Comment

On a regular basis I get questions about slow RDP performance, RDP connection problems, strange errors and even BSOD, remote computers freezing or restarting after initiation of a remote session. In a lot of this cases the quick solutions made b…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now