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-06-25 08:45
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Closed]Is there a batch script to delete a USB drive View 13,425 Replies 66
Floor 16 Posted 2006-12-15 10:38 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

Execution in the command line:
for /f %i in ('devcon findall usb* ^|find /i "usb mass storage"') do devcon remove "@%i"
Floor 17 Posted 2006-12-15 11:51 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 906
Posts 346
Joined 2006-07-10 09:58
19-year member
UID 58334
Gender Male
Status Offline
Brother lxmxn
Copied this command. As shown in the following figure
http://photo.bababian.com/20061214/B16FF1F5F54F211080F74AAD4639AA16.jpg
Floor 18 Posted 2006-12-15 12:44 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

  Sweat one.

  This devcon is a command-line tool. You need to put it in the search path, such as in the system folder.C:\windows\system32.

[ Last edited by lxmxn on 2006-12-15 at 12:45 PM ]
Floor 19 Posted 2006-12-15 22:30 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 906
Posts 346
Joined 2006-07-10 09:58
19-year member
UID 58334
Gender Male
Status Offline
Thanks to all the above experts. I was too stupid.

"Quote from user lxmxn:
 Sweat.
  This devcon is a command-line tool. You need to place it in a searchable path, such as in the system folder.C:\windows\system32."

The problem was here. It's done.
Floor 20 Posted 2006-12-29 11:06 ·  中国 浙江 宁波 鄞州区 电信
新手上路
Credits 3
Posts 2
Joined 2006-12-29 10:28
19-year member
UID 74920
Gender Male
Status Offline
Thanks
Floor 21 Posted 2007-01-01 04:10 ·  中国 广东 肇庆 电信
初级用户
★★
Credits 152
Posts 74
Joined 2005-12-01 23:06
20-year member
UID 46314
Status Offline
Thanks
Floor 22 Posted 2007-01-21 10:42 ·  中国 云南 昆明 电信
初级用户
Credits 57
Posts 29
Joined 2006-12-27 09:36
19-year member
UID 74694
Gender Male
Status Offline
Bumped. There are so many experts here. Such a batch script can be written. Thanks! Collected and will study.
Floor 23 Posted 2007-01-21 14:13 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
Originally posted by ccuu668 at 2007-1-20 21:42:
Bumped. There are so many experts here. You can write such batch processing. Thanks! Collected and studied.


  This is just a simple operation using a third-party command-line tool. There are more classic batch processing. Just search the forum posts, and there are many~
Floor 24 Posted 2007-01-31 23:31 ·  中国 河南 新乡 联通
新手上路
Credits 13
Posts 7
Joined 2007-01-26 03:54
19-year member
UID 77694
Gender Male
Status Offline
Yes, the LZ is correct. I tried it and it really works. Give it a thumbs up!!~
Floor 25 Posted 2007-04-01 10:46 ·  中国 河南 开封 联通
新手上路
Credits 10
Posts 6
Joined 2007-01-10 02:21
19-year member
UID 76005
Gender Male
Status Offline
Floor 26 Posted 2007-04-11 14:30 ·  中国 上海 浦东新区 电信
新手上路
Credits 6
Posts 2
Joined 2007-03-11 08:07
19-year member
UID 81388
Gender Male
Status Offline
Floor 27 Posted 2007-04-16 05:06 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 866
Posts 415
Joined 2005-12-04 11:19
20-year member
UID 46459
Status Offline
Using third-party tools always feels a bit unpleasant. ^O^
Floor 28 Posted 2007-04-26 09:48 ·  中国 浙江 温州 苍南县 电信
新手上路
Credits 9
Posts 3
Joined 2007-04-26 09:22
19-year member
UID 86533
Gender Male
Status Offline
Floor 29 Posted 2007-04-26 11:01 ·  中国 广东 惠州 电信
新手上路
Credits 10
Posts 5
Joined 2006-12-01 12:21
19-year member
UID 72277
Gender Male
Status Offline
Floor 30 Posted 2007-06-07 16:06 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 2
Posts 1
Joined 2007-06-07 15:31
19-year member
UID 90568
Gender Male
Status Offline
I've been looking for this kind of thing all the time, not sure if this is feasible
Forum Jump: