I want to copy multiple directories from one location to another location only if any of the subdirectories of those contain connect.txt file in them.
connect.txt
Examp
move *\*\connect.txt C:\Desktop This uses a regular expression which would work if you're really wanting to look only under the subdirectories of all directories at some location.
move *\*\connect.txt C:\Desktop