如何根据文件名列表批量搜索文件
4个回答
2022-12-15 · 百度认证:IT168官方账号,优质数码领域创作者
关注
展开全部
根据文件名列表批量搜索文件的具体操作步骤如下:
1、首先我们打开电脑桌面,在桌面空白地方单击鼠标右键,点击新建文本文档。
/iknow-pic.cdn.bcebos.com/9825bc315c6034a8f40d69dcc513495408237684"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/9825bc315c6034a8f40d69dcc513495408237684?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/9825bc315c6034a8f40d69dcc513495408237684"/>
2、然后在文本中输入下面一段代码。
/iknow-pic.cdn.bcebos.com/4afbfbedab64034f7b51135ba1c379310b551dca"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/4afbfbedab64034f7b51135ba1c379310b551dca?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/4afbfbedab64034f7b51135ba1c379310b551dca"/>
3、然后打开文件点击另存为,文件名保存为:新建文档.bat ,此处一定要改后缀为.bat才行。
/iknow-pic.cdn.bcebos.com/8644ebf81a4c510f825b33476e59252dd52aa5d4"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/8644ebf81a4c510f825b33476e59252dd52aa5d4?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/8644ebf81a4c510f825b33476e59252dd52aa5d4"/>
4、然后我们在桌面上右键新建文档.bat点击编辑。
/iknow-pic.cdn.bcebos.com/8b82b9014a90f60360774d1a3712b31bb151edac"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/8b82b9014a90f60360774d1a3712b31bb151edac?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/8b82b9014a90f60360774d1a3712b31bb151edac"/>
5、添加源文件路径,比如总文件在''D:\3-软件文件\桌面\源文件''这里,那就把''源文件地址''替换成''D:\3-软件文件\桌面\源文件''。
/iknow-pic.cdn.bcebos.com/241f95cad1c8a78601cd9b536909c93d71cf508c"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/241f95cad1c8a78601cd9b536909c93d71cf508c?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/241f95cad1c8a78601cd9b536909c93d71cf508c"/>
6、然后我们修改需要查找的文件存放位置,比如"查找后需要存放的地址"修改成''D:\桌面\拷贝结果存放位置'',按快捷键Ctrl+S保存文档就可以了。
/iknow-pic.cdn.bcebos.com/8c1001e93901213f320d9e815ae736d12f2e95b5"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/8c1001e93901213f320d9e815ae736d12f2e95b5?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/8c1001e93901213f320d9e815ae736d12f2e95b5"/>
7、最后设置需要查找拷贝的文件名称。以文本文档的形式保存文件名的排列格式是每行一个,最后直接单击运行,你就会在''拷贝结果存放位置''文件夹中看到你想要的文件。
/iknow-pic.cdn.bcebos.com/d043ad4bd11373f07920bfc2aa0f4bfbfbed0454"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/d043ad4bd11373f07920bfc2aa0f4bfbfbed0454?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/d043ad4bd11373f07920bfc2aa0f4bfbfbed0454"/>
1、首先我们打开电脑桌面,在桌面空白地方单击鼠标右键,点击新建文本文档。
/iknow-pic.cdn.bcebos.com/9825bc315c6034a8f40d69dcc513495408237684"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/9825bc315c6034a8f40d69dcc513495408237684?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/9825bc315c6034a8f40d69dcc513495408237684"/>
2、然后在文本中输入下面一段代码。
/iknow-pic.cdn.bcebos.com/4afbfbedab64034f7b51135ba1c379310b551dca"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/4afbfbedab64034f7b51135ba1c379310b551dca?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/4afbfbedab64034f7b51135ba1c379310b551dca"/>
3、然后打开文件点击另存为,文件名保存为:新建文档.bat ,此处一定要改后缀为.bat才行。
/iknow-pic.cdn.bcebos.com/8644ebf81a4c510f825b33476e59252dd52aa5d4"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/8644ebf81a4c510f825b33476e59252dd52aa5d4?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/8644ebf81a4c510f825b33476e59252dd52aa5d4"/>
4、然后我们在桌面上右键新建文档.bat点击编辑。
/iknow-pic.cdn.bcebos.com/8b82b9014a90f60360774d1a3712b31bb151edac"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/8b82b9014a90f60360774d1a3712b31bb151edac?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/8b82b9014a90f60360774d1a3712b31bb151edac"/>
5、添加源文件路径,比如总文件在''D:\3-软件文件\桌面\源文件''这里,那就把''源文件地址''替换成''D:\3-软件文件\桌面\源文件''。
/iknow-pic.cdn.bcebos.com/241f95cad1c8a78601cd9b536909c93d71cf508c"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/241f95cad1c8a78601cd9b536909c93d71cf508c?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/241f95cad1c8a78601cd9b536909c93d71cf508c"/>
6、然后我们修改需要查找的文件存放位置,比如"查找后需要存放的地址"修改成''D:\桌面\拷贝结果存放位置'',按快捷键Ctrl+S保存文档就可以了。
/iknow-pic.cdn.bcebos.com/8c1001e93901213f320d9e815ae736d12f2e95b5"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/8c1001e93901213f320d9e815ae736d12f2e95b5?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/8c1001e93901213f320d9e815ae736d12f2e95b5"/>
7、最后设置需要查找拷贝的文件名称。以文本文档的形式保存文件名的排列格式是每行一个,最后直接单击运行,你就会在''拷贝结果存放位置''文件夹中看到你想要的文件。
/iknow-pic.cdn.bcebos.com/d043ad4bd11373f07920bfc2aa0f4bfbfbed0454"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/d043ad4bd11373f07920bfc2aa0f4bfbfbed0454?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/d043ad4bd11373f07920bfc2aa0f4bfbfbed0454"/>
展开全部
请把excel中文件名复制到txt文件中,保存1.txt
@echo off
md e:\file
for /f "delims=" %%a in (1.txt) do (
for /f "delims=" %%b in ('dir /a-d /b /s d:\photos') do (
if "%%a"=="%%~nb" xcopy "%%b" e:\file
)
)
pause在e盘创建一个file文件夹,把找到的文件都复制到e盘的file文件夹下
@echo off
md e:\file
for /f "delims=" %%a in (1.txt) do (
for /f "delims=" %%b in ('dir /a-d /b /s d:\photos') do (
if "%%a"=="%%~nb" xcopy "%%b" e:\file
)
)
pause在e盘创建一个file文件夹,把找到的文件都复制到e盘的file文件夹下
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把列表中的文件名导出到文本文件a.txt,每个文件名一行
如果带路径
for
/f
"tokens=*"
%%i
in
(a.txt)
do
del
"%%i"
如果只有文件名不带路径,不过这样做要慎重
for
/f
"tokens=*"
%%i
in
(a.txt)
do
del
"%%i"
/s
如果带路径
for
/f
"tokens=*"
%%i
in
(a.txt)
do
del
"%%i"
如果只有文件名不带路径,不过这样做要慎重
for
/f
"tokens=*"
%%i
in
(a.txt)
do
del
"%%i"
/s
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询