
CODE: [Copy to clipboard]@echo off
:: 说明:加入此批处理放在你的U盘的根目录中
:: 需要复制的文件为 text.txt
:: 要将文件复制到第二个U盘的根目录中
for /f "skip=1" %%a in ('wmic logicaldisk where "Description='可移动磁盘'" get caption') do (
if not "%%a"=="%cd:~0,2%" set "drive=%%a#"
)
if not "%drive%"=="#" (set drive=%drive:~0,2%) else (echo 没有足够的 可移动磁盘 ,请检查!&pause&exit)
copy text.txt %drive%\
pause&exit/b0
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |