如果目录的子目录包含"connect.txt",则复制目录. [英] Copy directories if their subdirectories contain "connect.txt"
本文介绍了如果目录的子目录包含"connect.txt",则复制目录.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
仅当目录中的任何子目录中包含connect.txt
文件时,我才希望将多个目录从一个位置复制到另一位置.
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.
示例:
ANIMAL\DOG\CONNECT.TXT
PLANET\EARTH\CONNECT.TXT
SYSTEM\USER\ADMIN.TXT
然后我只想复制ANIMAL
& PLANET
目录到C:\DESKTOP
.
Then I ONLY want to copy ANIMAL
& PLANET
directories to C:\DESKTOP
.
推荐答案
move *\*\connect.txt C:\Desktop
如果您确实只想在某个位置的所有目录的子目录下查找,它将使用一个正则表达式.
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.
这篇关于如果目录的子目录包含"connect.txt",则复制目录.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文