中国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-29 08:05
47,816 topics / 349,916 posts / today 0 new / 48,265 members
DOS批处理 & 脚本技术(批处理室) » Help: Copy files or folders under indefinite subdirectories
Printable Version  1,712 / 4
Floor1 veryrabbit Posted 2007-03-10 22:33
初级用户 Posts 8 Credits 20
I want to understand how to copy specific files or folders in subdirectories. For example: There is a file named abc.txt in the C: subdirectory (the path is not clear), and I want to find it and copy it to another place. I'm a beginner, and I hope to be explained in detail.
Floor2 slore Posted 2007-03-10 23:13
铂金会员 Posts 2,478 Credits 5,212
dir /s /b c:\abc.txt
Floor3 veryrabbit Posted 2007-03-11 01:34
初级用户 Posts 8 Credits 20
Then I want to use copy to copy this file to another disk. How to call this path?
Floor4 zhoushijay Posted 2007-03-11 01:37
高级用户 Posts 375 Credits 845
echo
for /f %%i in ('dir /s /b c:\abc.txt') do copy %%i d:\
Floor5 veryrabbit Posted 2007-03-11 02:00
初级用户 Posts 8 Credits 20
Thanks
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023