中国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-03 17:10
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » Copy a file to the root directories of all specified disks, and it cannot be deleted
Printable Version  2,343 / 19
Floor1 mfdcxnf Posted 2007-03-02 00:39
初级用户 Posts 74 Credits 155
I read (Essence I: Batch Processing Room Classic Post Classification Index) and saw the part about copying a file to many folders (with patterns). Now I want to ask, can I copy a specified file to all folders on a specified drive?

[ Last edited by namejm on 2007-3-1 at 06:29 PM ]
Floor2 slore Posted 2007-03-02 00:45
铂金会员 Posts 2,478 Credits 5,212
dir /s /b /ad D:
This will get all folder paths, and it can be handled with for.... Is it for doing something bad?
Floor3 mfdcxnf Posted 2007-03-02 00:47
初级用户 Posts 74 Credits 155
Why do people always think about doing bad things? Coming here is originally for discussion. Learning some new things, right? So no matter what, as long as there is a kind heart, one won't do bad things.
Floor4 slore Posted 2007-03-02 00:53
铂金会员 Posts 2,478 Credits 5,212
Aren't I the one who told you? But do you think it's generally necessary?

desktop.ini? Configuration folder background?
Floor5 mfdcxnf Posted 2007-03-02 05:39
初级用户 Posts 74 Credits 155
Thanks to the guidance from the person above, I have completed it.
for /f %%i in ('dir /s /a /b /ad e:.') do (copy 99.bat %%i\)
Floor6 jmz573515 Posted 2007-03-02 05:44
银牌会员 Posts 464 Credits 1,212
Even if it's copied to each folder, it doesn't matter. It can be deleted by searching, so there's no real harm... Personal opinion :)
Floor7 qingfushuan Posted 2007-03-02 06:01
高级用户 Posts 327 Credits 502
Methods are neutral, people are kind, and being eager to learn is always right
Floor8 mfdcxnf Posted 2007-03-02 06:22
初级用户 Posts 74 Credits 155
Then continue to think, is there a method that can't be deleted. Haha
Floor9 NaturalJ0 Posted 2007-03-02 06:28
银牌会员 Posts 533 Credits 1,181
Why can't it be deleted?
Floor10 mfdcxnf Posted 2007-03-02 07:10
初级用户 Posts 74 Credits 155
Use system processes and the like, anyway, it's forbidden to access. I don't know either, just see if experts have good methods and tips, let's think together, everyone.
Floor11 mfdcxnf Posted 2007-03-04 08:25
初级用户 Posts 74 Credits 155
Why is there no expert to give guidance?
Floor12 mfdcxnf Posted 2007-03-04 08:52
初级用户 Posts 74 Credits 155
Please help everyone. The attachment is to copy files to all subdirectories of drive D. But after running the BAT, it will display copying a file. How to make this prompt not show? Please give your advice from all friends. Thank you in advance here.

Attachments
复制文件到子目录下.rar (225 bytes)
Floor13 zhoushijay Posted 2007-03-04 09:39
高级用户 Posts 375 Credits 845
Hehe, I also thought about using BAT before, but this is too easy to be discovered and doesn't work. Advanced viruses need file protection instead of hiding. Even if you find the file, you can't delete it.
Floor14 aatiandiS Posted 2007-03-04 19:41
新手上路 Posts 2 Credits 5
Thanks
Floor15 mfdcxnf Posted 2007-03-07 05:28
初级用户 Posts 74 Credits 155
I come to top again, haha. And then ask the experts to help solve it, haha
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023