中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-13 05:17
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » What DOS command copies a file to all subdirectories under a root directory
Printable Version  669 / 2
Floor1 solen Posted 2004-01-27 00:00
初级用户 Posts 20 Credits 180
What is the DOS command to copy a file to all subdirectories under a root directory?

COPY FILENAME /???

What parameter should be added?


Floor2 zxmc Posted 2004-01-30 00:00
初级用户 Posts 1 Credits 105
What parameter should be added??
Floor3 whatsmore Posted 2004-01-30 00:00
初级用户 Posts 25 Credits 188
If you don't need the subdirectories under those subdirectories, you can do this:
for %f in (*.*) copy FILENAME %f\NEWNAME
If you do need that, then:
dir *. /b/s>1.bat
Then edit it yourself in WPS, search for "^P^M", replace it with "^P^Mcopy FILENAME " (note the space)
Then adjust the first line and the last line yourself
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023