Move only folders (and contents) which match a string?
Posted on 2009-07-07
I have a very large folder structure and need to find all subfolders with a certain keyword in them and then move those subfolders (including contents) to a new location. For instance, say I have the following folders containing files of various types:
Now, I want to move all folders with the word "foo" in them from 'source' to 'destination'. The result I want is:
I was looking at robocopy and xcopy but neither seem to give me the ability to move a folder and its contents based on search criteria without affecting nonmatching folders in the source location. Any ideas? Maybe I am missing something painfully obvious.