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

x
?
Solved

Copy selected folders with Robocopy

Posted on 2013-11-20
3
Medium Priority
?
473 Views
Last Modified: 2013-11-21
I have a file server that has home drives for hundreds of users which we are migrating to a new server share.  There are about 10 sub-folders under the "Home" parent folder and within those 10 sub-folders are the user home directories for their particular place of employment.  I'd like to selectively copy the specific folders that are still in use to the new share.  I've researched robocopy and it appears that this is not an option with that tool.  So I was hoping to using Robocopy within a for /f loop to select the appropriate folders, and then copy them to the destination.  


Is this at all possible?  Is there an easier way?  I love robocopy but it only works well with source to destination copies and not very well with particular files/folders.  Thank you for your help.
0
Comment
Question by:netfriendsinc
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
etech0 earned 2000 total points
ID: 39664057
Offhand, I can think of two methods to try:
1. Write up a script that has a robocopy line for each folder you want to copy
2. Use one robocopy line with the /xd switch to exclude any directories you don't want to copy, and/or /xf to exclude files
0
 

Author Comment

by:netfriendsinc
ID: 39667161
that'll do donkey!  Thank you very much!
0
 
LVL 10

Expert Comment

by:etech0
ID: 39667171
Glad to help!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

824 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