![]() |
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-10-24 04:11 |
47,815 topics / 349,928 posts / today 1 new / 48,287 members |
| DOS批处理 & 脚本技术(批处理室) » [Partially closed]Is there a USB drive letter recognition program like findcd called findusb? |
| Printable Version 7,454 / 26 |
| Floor16 electronixtar | Posted 2006-09-11 21:12 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
Tip: Home edition of XP has no wmic~~~
|
|
| Floor17 doit2004 | Posted 2006-10-09 04:13 |
| 新手上路 Posts 1 Credits 2 | |
|
Then what to do under NT system?
|
|
| Floor18 brglng | Posted 2006-10-09 10:07 |
| 银牌会员 Posts 466 Credits 1,200 From 上海 | |
|
How to accomplish this under pure DOS?
|
|
| Floor19 lyncom | Posted 2007-05-15 16:52 |
| 新手上路 Posts 2 Credits 4 | |
|
Is there any content about mapping the CD-ROM drive as %cdrom%
|
|
| Floor20 axi | Posted 2007-05-15 21:50 |
| 中级用户 Posts 93 Credits 238 From GZ | |
Originally posted by gmy at 2006-9-11 21:06: Since both USB-HDD and hard disks are detected as local fixed disks, it is difficult to judge in this way, but we can consider the way of judging the newly added drive, as follows VBS: |
|
| Floor21 lmm333 | Posted 2007-10-23 09:39 |
| 初级用户 Posts 20 Credits 48 | |
|
I want to make a batch script that can automatically detect the drive letter of a USB flash drive when it is connected to the system and automatically perform operations like deletion, copying, or backing up. Please show me how to write the script. Previously, I wrote a relatively simple and rigid one that could only be fixed on a certain USB flash drive letter and required manual key presses. Also, when two are connected at the same time, it will go wrong because there is always a first and a second when connected, and the system displays the drive letters in a first-come-first-served manner, so often only the first connected one can be operated on...
|
|
| Floor22 dooomer | Posted 2007-10-23 16:06 |
| 初级用户 Posts 52 Credits 109 | |
|
Is the batch script upstairs meant to run all the time and detect USB drives at any moment?
Or is it meant to be placed on a USB drive as an autorun program for the USB drive? The latter might be easier. You can use cd to get its path, then handle it a bit to extract the drive letter. |
|
| Floor23 lmm333 | Posted 2007-10-23 16:24 |
| 初级用户 Posts 20 Credits 48 | |
|
No, I want to make a batch script. When I need to use a USB drive, I just double-click to run it. Because I need to test many USB drives for work, and often do a lot of repetitive work, such as copying a 100M to 1000M test file, and then deleting it after the test... It's very tiring and boring... I want to make the batch processing run automatically, and all I need to do is plug in and unplug the USB drive, without having to click the mouse or keyboard again...
|
|
| Floor24 fei009 | Posted 2008-08-19 16:18 |
| 新手上路 Posts 3 Credits 8 | |
|
Additionally, what is the principle of detecting the USB flash drive drive letter? Is it only based on the disk name "Removable Disk"?
Additionally, what does DriveType mean? |
|
| Floor25 HAT | Posted 2008-08-19 17:24 |
| 版主 Posts 5,017 Credits 9,023 | |
|
DriveType represents the disk type
0: "Unknown" 1: "Removable disk" 2: "Local disk" 3: "Network disk or removable hard disk" 4: "CD-ROM" 5: "RamDisk memory disk" |
|
| Floor26 fei009 | Posted 2008-08-20 11:23 |
| 新手上路 Posts 3 Credits 8 | |
|
Can we get the U disk drive letter without using wmic? Just use internal commands.
|
|
| Floor27 popo77 | Posted 2010-03-02 17:27 |
| 新手上路 Posts 4 Credits 6 | |
|
I searched a lot online, but it seems none are perfect.
There are devcon, wmic, vbs Is there a way to achieve the following functions using DOS commands? Automatically identify the USB flash drive, obtain the drive letter, delete the USB flash drive, and re-identify the USB flash drive. |
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |