Copy directories if their subdirectories contain “connect.txt”

血红的双手。 提交于 2019-12-04 07:07:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!