Solved

Copy file from UNIX to WINDOWS shared folder

Posted on 2013-05-15
5
872 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 78

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 78

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…

726 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