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

x
?
Solved

Copy selected folders with Robocopy

Posted on 2013-11-20
3
Medium Priority
?
468 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
[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
  • 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

Make the most of your online learning experience.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

661 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