Solved

Copy file from UNIX to WINDOWS shared folder

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

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 77

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

15 Experts available now in Live!

Get 1:1 Help Now