Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to copy and paste folders and files from one server to other servers?

Posted on 2013-01-09
5
Medium Priority
?
451 Views
Last Modified: 2013-01-14
In one server we have folder name called TEST and it has some files. I want to copy and paste this folder and files in 10 another servers using unix tools.  I use to copy files from one server to another server using the below command. Can you please tell me how to move folders and files?
Thanks.

xcopy /Y \\soreceserver\test\*.* \\10.xx.xxx.1\test\
xcopy /Y \\soreceserver\test\*.* \\10.xx.xxx.2\test\

All servers  Operating system : Windows Server 2008 R2 Enterprise
All Servers has Unix tools in C Drive.
0
Comment
Question by:PKTG
[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
  • 3
  • 2
5 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 1500 total points
ID: 38760404
You could use scp, if you have it.  

scp -r servername:/test/*  10.xx.xxx.1/test

Or something similar.  Then you can use a for loop to transfer the same files to many servers.
0
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 1500 total points
ID: 38760410
If the files are on the local machine, you don't need the server name.  Just the path.

Can you see all the files by doing something like
ls /test/*
0
 

Accepted Solution

by:
PKTG earned 0 total points
ID: 38761039
The below command worked for me. Thanks.

cp -r  \\ServerName\Test\  \\10.xx.xxx.1\
0
 
LVL 31

Expert Comment

by:farzanj
ID: 38761052
Ok, good.

Do you want to run a loop?
0
 

Author Closing Comment

by:PKTG
ID: 38773848
My solution worked for me. Thanks for giving idea.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

688 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