Solved

Copy file from UNIX to WINDOWS shared folder

Posted on 2013-05-15
5
878 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

696 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