• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 891
  • Last Modified:

Copy file from UNIX to WINDOWS shared folder

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
Lee R Liddick Jr
Asked:
Lee R Liddick Jr
  • 2
  • 2
2 Solutions
 
farzanjCommented:
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
 
arnoldCommented:
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
 
Lee R Liddick JrReporting AnalystAuthor Commented:
It didn't like the cp command...
0
 
arnoldCommented:
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
 
Lee R Liddick JrReporting AnalystAuthor Commented:
I found out it was a permissions problem...I'm splitting the points for your time to respond.  Thank you both.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now