Solved

Copy selected folders with Robocopy

Posted on 2013-11-20
3
452 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 500 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

820 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