且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将文件复制到同一目录中的多个文件夹

更新时间:2023-09-26 09:09:16

直接从提示符

for /d %a in (d:\bootd\hello\2014*) do copy /y C:\EXAMPLE.DBF %a\

将C:\ EXAMPLE.DBF复制到与模式2014*匹配的d:\ bootd \ hello \的每个目录(即,简单地启动2014),如果存在,则替换该子目录中的所有现有example.dbf那就是你想做的.

Will copy C:\EXAMPLE.DBF to each directory of d:\bootd\hello\ which matches the pattern 2014* (ie. simply starts 2014), replacing any existing example.dbf in that subdirectory, if that is what you want to do.

要抑制每个生成的1 file(s) copied消息,只需将>nul附加到上一行.

To suppress the 1 file(s) copied messae generate for each, simply append >nul to the above line.