Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-01-09
5
Medium Priority
?
453 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
  • 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

971 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