I want to implement the following functionality using either the Windows Command Prompt, Powershell, or a combination of the two:
Suppose we are given a source directory, sourcedir and a destination directory destinationdir, and we want to copy files, recursively, from the source to the destination.
We are also given a wildcard filter like so */foo/bar/*; the filter means find all files in sourcedir that contain /foo/bar/ anywhere in its path. For instance, sourcedir/foo/bar/file1.txt, and sourcedir/baz/foo/bar/file2.txt will be copied, while sourcedir/foo/baz/bar/file3.txt will not be copied.
**/partial path wildcard