Solved

Copy selected folders with Robocopy

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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 …

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now