插入不同PC上批量文件目录时检测USB驱动器号的代码?
问题描述:
@echo off
cd "G:\Stuff\Util"
start launch.bat
cd "G:\Stuff"
for /L %%a in (1,1,10) do (
Start batch2.bat
exit 0
)
^我的代码插入不同PC上批量文件目录时检测USB驱动器号的代码?
我需要知道如何让我的批处理文件在不同的PC上运行的其他人。当我插入不同的电脑时,驱动器号可能会改变。我该如何解决这个问题?
答
想通了。
@echo off
pushd %~d0
cd "\Stuff\Util"
start launch.bat
cd "\Stuff"
for /L %%a in (1,1,10) do (
Start batch2.bat
exit 0
)
你检查这个帖子:https://stackoverflow.com/questions/10868613/detect-usb-and-copy-to-usb-drive-using-batch-script – funcoding