简单的批处理-搜索和拷贝文件

操作系统的搜素文件的功能无法使用,因为是朋友的电脑,也不敢重装系统。就想到了用批处理来搜索文件,再把符合文件的拷贝到指定的目录。

@echo off
set root=%1 
set match=%2
set dest=%3
 
for /d %%i in (%root%\*) do (
   copy "%%i\%match%"  "%dest%"
)
pause

那时,怎么就没想到去修补系统的这个小问题,看来是得了编程强迫症的职业病。%>_<%

This entry was posted in 编程开发. Bookmark the permalink.

Comments are closed.