Thx

I'd also note that the /mir switch may not be exactly the option you want with 
robocopy, but that will copy the whole folder tree, deleting files at the 
destination if they're not at the source.

From: Andrew S. Baker [mailto:asbz...@gmail.com]
Sent: Wednesday, July 20, 2011 11:23 AM
To: NT System Admin Issues
Subject: Re: file searching and copying

Good one, Scott.

Jeff, remember to add a % to each variable if used in a batch file, vs the 
command line.


ASB

http://about.me/Andrew.S.Baker

Harnessing the Advantages of Technology for the SMB market...



On Wed, Jul 20, 2011 at 12:13 PM, Crawford, Scott 
<crawfo...@evangel.edu<mailto:crawfo...@evangel.edu>> wrote:
For /f "tokens=*" %i in ('dir *WORDS_TO_SEARCH* /s/a/b/ad') do robocopy /mir 
"%i" DESTINATION_PATH

This will search a folder tree for directorys.  Change the dir command to 
eliminate the /s if you only want to search the root.

From: Jeff Bunting 
[mailto:bunting.j...@gmail.com<mailto:bunting.j...@gmail.com>]
Sent: Wednesday, July 20, 2011 11:01 AM

To: NT System Admin Issues
Subject: file searching and copying

I'm attempting to search for particular words in a directory name (must use 
wildcards!), and, if found, copy the the directory tree while maintaining its 
structure to another directory.

Are there any native tools (or reskit like robocopy) that can accomplish this 
somewhat easily?

thanks,
Jeff



~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to