@echo off for /f "tokens=2 delims==" %%a in ('wmic LogicalDisk where "VolumeName='Hello'" get DeviceID /value') do ( set DriveU=%%a ) md D:\Debug%date:~0,4%%date:~5,2%%date:~8,2% :echo %DriveU:~0,1%:\DianJiao_ver2\DianJiao_ver2\bin\x64\Debug xcopy %DriveU:~0,1%:\DianJiao_ver2\DianJiao_ver2\bin\x64\Debug D:\Debug%date:~0,4%%date:~5,2%%date:~8,2% /s /e /c /y /h /r pause
参考:
1.http://www.cnblogs.com/jinjiangongzuoshi/p/3383878.html
2.https://www.jb51.net/article/11313.htm
3.https://blog.csdn.net/clever101/article/details/8618881
4.https://blog.csdn.net/sunears/article/details/5941057