shell 倒是会,bat不太会,不过应该差不多吧,参考下
list=D:\file.txt
dst=F:\result
src=D:\search
function search_dir()
{
for i in $1
do
path=$1\$i
if [ -d $path ];then
search_dir $path
else
grep $i $list
if [ $? -eq 0 ];then
echo "found $i in $list"
cp $path $dst
fi
fi
done
}
search_dir $src
你是要编程实现还是批处理文件实现?