China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-03 17:11
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Copy a file to the root directories of all specified disks, and it cannot be deleted View 2,345 Replies 19
Floor 16 Posted 2007-03-07 05:32 ·  中国 辽宁 朝阳 联通
铂金会员
★★★★
痴迷DOS者
Credits 5,798
Posts 1,924
Joined 2003-06-20 00:00
23-year member
UID 5583
Gender Male
From 金獅電腦軟體工作室
Status Offline
After copying, you need to set the file attributes
熟能生巧,巧能生精,一艺不精,终生无成,精亦求精,始有所成,臻于完美,永无止境!
金狮電腦軟體工作室愿竭诚为您服务!
QQ群:8393170(定期清理不发言者)
个人网站:http://www.520269.cn
电子邮件:doujiehui@vip.qq.com
微信公众号: doujiehui
Floor 17 Posted 2007-03-07 08:55 ·  中国 浙江 绍兴 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
If you want to be unable to delete, then embed it into the system process, such as explorer.exe, then it can't be deleted unless you also delete explorer. But this is恐怕 difficult with BAT...
Floor 18 Posted 2007-03-08 08:56 ·  中国 广东 广州 移动
初级用户
Credits 68
Posts 32
Joined 2007-01-24 04:00
19-year member
UID 77490
Gender Male
From 广东潮州
Status Offline
I took a look at the code. Other things remain unchanged, just add a >nul 2>NUL after the COPY command. That is,
copy 21.bat %%i\ >nul 2>nul

For the usage of NUL, you can refer to other posts in the forum.

As for the ones that can't be deleted, I don't understand either. Wait for experts to reply!
Floor 19 Posted 2007-03-10 04:18 ·  中国 浙江 杭州 电信
初级用户
★★
Credits 155
Posts 74
Joined 2007-02-21 07:24
19-year member
UID 79875
Gender Male
Status Offline
What I verified on the 18th floor doesn't work, but I still thank you. Please help think of another way.
Floor 20 Posted 2007-03-10 04:41 ·  中国 浙江 杭州 电信
初级用户
★★
Credits 155
Posts 74
Joined 2007-02-21 07:24
19-year member
UID 79875
Gender Male
Status Offline
How to load into the explorer.exe process.
Forum Jump: