问题
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.
Example:
ANIMAL\DOG\CONNECT.TXT
PLANET\EARTH\CONNECT.TXT
SYSTEM\USER\ADMIN.TXT
Then I ONLY want to copy ANIMAL & PLANET directories to C:\DESKTOP.
回答1:
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.
来源:https://stackoverflow.com/questions/56462621/copy-directories-if-their-subdirectories-contain-connect-txt